layui.define
(['table'], function (exports) {
	/* 定义object对象【start】 */
	var object = {
		init:function (c) {this.f(c);this.load();return object;},
		c: {data:[]}, // 配置项
		f: function (c) { // 数据初始化
			var s = new Date().getTime(),t = this;
			/* YsGrid基本配置，格式：
			{
				"id": "id_form_for_search",
				"conditions": [{}]
			}
			 */
			t.c = c;
			t.c.menuId = c.menuId;
			t.c.id_table_main = c.id_table_main;
			t.c.gridObj = c.gridObj;
		},
		load:function () { // 加载控件
			this.listenBtn();
		},
		listenBtn:function () { // 添加监听
			var t = this;
			// 工具栏事件
			layui.table.on('toolbar(' + t.c.id_table_main + ')', function(obj){
				var id = obj.config.id;
				var checkStatus = layui.table.checkStatus(id);
				var datas = checkStatus.data;
				var othis = lay(this);
				
				if(t.c.menuId == 17) { // 按钮监听-【历年店铺订单】
					t.listenMenu17(obj, datas);
				} else if(t.c.menuId == 18) { // 按钮监听-【店铺日报表】
					t.listenMenu18(obj, datas);
				} else if(t.c.menuId == 19) { // 按钮监听-【商品日报表】
					t.listenMenu19(obj, datas);
				} else if(t.c.menuId == 20) { // 按钮监听-【】
					t.listenMenu20(obj, datas);
				} else if(t.c.menuId == 27) { // 按钮监听-【】
					t.listenMenu27(obj, datas);
				}else if(t.c.menuId == 28) { // 按钮监听-【】
					t.listenMenu28(obj, datas);
				} else if(t.c.menuId == 29) { // 按钮监听-【】
					t.listenMenu29(obj, datas);
				} else if(t.c.menuId == 30) { // 按钮监听-【】
					t.listenMenu30(obj, datas);
				} else if(t.c.menuId == 32) { // 按钮监听-【】
					t.listenMenu32(obj, datas);
				} else if(t.c.menuId == 37) { // 按钮监听-【】
					t.listenMenu37(obj, datas);
				} else if(t.c.menuId == 38) { // 按钮监听-【】
					t.listenMenu38(obj, datas);
				} else if(t.c.menuId == 41) { // 按钮监听-【】
					t.listenMenu41(obj, datas);
				} else if(t.c.menuId == 47) { // 按钮监听-【】
					t.listenMenu47(obj, datas);
				} else if(t.c.menuId == 51) { // 按钮监听-【】
					t.listenMenu51(obj, datas);
				} else if(t.c.menuId == 52) { // 按钮监听-【】
					t.listenMenu52(obj, datas);
				} else if(t.c.menuId == 53) { // 按钮监听-【】
					t.listenMenu53(obj, datas);
				} else if(t.c.menuId == 54) { // 按钮监听-【】
					t.listenMenu54(obj, datas);
				} else if(t.c.menuId == 55) { // 按钮监听-【】
					t.listenMenu55(obj, datas);
				} else if(t.c.menuId == 57) { // 按钮监听-【】
					t.listenMenu57(obj, datas);
				} else if(t.c.menuId == 59) { // 按钮监听-【】
					t.listenMenu59(obj, datas);
				} else if(t.c.menuId == 63) { // 按钮监听-【】
					t.listenMenu63(obj, datas);
				} else if(t.c.menuId == 64) { // 按钮监听-【】
					t.listenMenu64(obj, datas);
				} else if(t.c.menuId == 65) { // 按钮监听-【】
					t.listenMenu65(obj, datas);
				} else if(t.c.menuId == 66) { // 按钮监听-【】
					t.listenMenu66(obj, datas);
				} else if(t.c.menuId == 67) { // 按钮监听-【】
					t.listenMenu67(obj, datas);
				} else if(t.c.menuId == 70) { // 按钮监听-【】
					t.listenMenu70(obj, datas);
				} else if(t.c.menuId == 71) { // 按钮监听-【】
					t.listenMenu71(obj, datas);
				} else if(t.c.menuId == 72) { // 按钮监听-【】
					t.listenMenu72(obj, datas);
				} else if(t.c.menuId == 73) { // 按钮监听-【】
					t.listenMenu73(obj, datas);
				} else if(t.c.menuId == 74) { // 按钮监听-【】
					t.listenMenu74(obj, datas);
				} else if(t.c.menuId == 76) { // 按钮监听-【】
					t.listenMenu76(obj, datas);
				} else if(t.c.menuId == 81) { // 按钮监听-【】
					t.listenMenu81(obj, datas);
				} else if(t.c.menuId == 82) { // 按钮监听-【】
					t.listenMenu82(obj, datas);
				} else if(t.c.menuId == 85) { // 按钮监听-【】
					t.listenMenu85(obj, datas);
				} else if(t.c.menuId == 100) { // 按钮监听-【】
					t.listenMenu100(obj, datas);
				} else if(t.c.menuId == 102) { // 按钮监听-【】
					t.listenMenu102(obj, datas);
				} else if(t.c.menuId == 108) { // 按钮监听-【】
					t.listenMenu108(obj, datas);
				} else if(t.c.menuId == 109) { // 按钮监听-【】
					t.listenMenu109(obj, datas);
				} else if(t.c.menuId == 119) { // 按钮监听-【】
					t.listenMenu119(obj, datas);
				} else if(t.c.menuId == 120) { // 按钮监听-【】
					t.listenMenu120(obj, datas);
				} else if(t.c.menuId == 122) { // 按钮监听-【】
					t.listenMenu122(obj, datas);
				} else if(t.c.menuId == 123) { // 按钮监听-【】
					t.listenMenu123(obj, datas);
				} else if(t.c.menuId == 124) { // 按钮监听-【】
					t.listenMenu124(obj, datas);
				} else if(t.c.menuId == 125) { // 按钮监听-【】
					t.listenMenu125(obj, datas);
				} else if(t.c.menuId == 126) { // 按钮监听-【】
					t.listenMenu126(obj, datas);
				} else if(t.c.menuId == 127) { // 按钮监听-【】
					t.listenMenu127(obj, datas);
				} else if(t.c.menuId == 128) { // 按钮监听-【】
					t.listenMenu128(obj, datas);
				} else if(t.c.menuId == 136) { // 按钮监听-【】
					t.listenMenu136(obj, datas);
				} else if(t.c.menuId == 140) { // 按钮监听-【】
					t.listenMenu140(obj, datas);
				} else if(t.c.menuId == 141) { // 按钮监听-【】
					t.listenMenu141(obj, datas);
				} else if(t.c.menuId == 10142) { // 按钮监听-【】
					t.listenMenu10142(obj, datas);
				} else if(t.c.menuId == 10151) { // 按钮监听-【】
					t.listenMenu10151(obj, datas);
				} else if(t.c.menuId == 10156) { // 按钮监听-【】
					t.listenMenu10156(obj, datas);
				} else if(t.c.menuId == 10160) { // 按钮监听-【】
					t.listenMenu10160(obj, datas);
				} else if(t.c.menuId == 10163) { // 按钮监听-【】
					t.listenMenu10163(obj, datas);
				} else if(t.c.menuId == 10165) { // 按钮监听-【】
					t.listenMenu10165(obj, datas);
				} else if(t.c.menuId == 10166) { // 按钮监听-【】
					t.listenMenu10166(obj, datas);
				} else if(t.c.menuId == 10167) { // 按钮监听-【平台站点维护】
					t.listenMenu10167(obj, datas);
				} else if(t.c.menuId == 10168) { // 按钮监听-【精品库】
					t.listenMenu10168(obj, datas);
				} else if(t.c.menuId == 10169) { // 按钮监听-【】
					t.listenMenu10169(obj, datas);
				} else if(t.c.menuId == 10171) { // 按钮监听-【】
					t.listenMenu10171(obj, datas);
				} else if(t.c.menuId == 10180) { // 按钮监听-【】
					t.listenMenu10180(obj, datas);
				} else if(t.c.menuId == 10182) { // 按钮监听-【组织机构管理】
					t.listenMenu10182(obj, datas);
				} else if(t.c.menuId == 10184) { // 按钮监听-【Listing库】
					t.listenMenu10184(obj, datas);
				} else if(t.c.menuId == 10192) { // 按钮监听-【Listing库】
					t.listenMenu10192(obj, datas);
				} else if(t.c.menuId == 10178) { // 按钮监听-【Listing申请】
					t.listenMenu10178(obj, datas);
				} else if(t.c.menuId == 10195) { // 按钮监听-【图标管理】
					t.listenMenu10195(obj, datas);
				} else if(t.c.menuId == 10199) { // 按钮监听-【预约调拨单】
					t.listenMenu10199(obj, datas);
				} else if(t.c.menuId == 10206) { // 按钮监听-【手工分配单】
					t.listenMenu10206(obj, datas);
				} else if(t.c.menuId == 10201) { // 按钮监听-【运营人员登记】
					t.listenMenu10201(obj, datas);
				} else if(t.c.menuId == 10203) { // 按钮监听-【预约调拨单】
					t.listenMenu10203(obj, datas);
				} else if(t.c.menuId == 10207) { // 按钮监听-【预约调拨取消单】
					t.listenMenu10207(obj, datas);
				} else if(t.c.menuId == 10205) { // 按钮监听-【员工入职申请】
					t.listenMenu10205(obj, datas);
				} else if(t.c.menuId == 10208) { // 按钮监听-【人员档案】
					t.listenMenu10208(obj, datas);
				} else if(t.c.menuId == 10219) { // 按钮监听-【邮件标签】
					t.listenMenu10219(obj, datas);
				}else if(t.c.menuId == 10213) { // 按钮监听-【招商信息申请】
					t.listenMenu10213(obj, datas);
				}else if(t.c.menuId == 10221) { // 按钮监听-【运营公司档案】
					t.listenMenu10221(obj, datas);
				}else if(t.c.menuId == 10227) { // 按钮监听-【万里汇账户管理】
					t.listenMenu10227(obj, datas);
				}else if(t.c.menuId == 10229) { // 按钮监听-【万里汇历史余额】
					t.listenMenu10229(obj, datas);
				}else if(t.c.menuId == 10231) { // 按钮监听-【万里汇多账号管理】
					t.listenMenu10231(obj, datas);
				}else if(t.c.menuId == 10233) { // 按钮监听-【员工个税管理子表】
					t.listenMenu10233(obj, datas);
				}else if(t.c.menuId == 10235) { // 按钮监听-【币种管理】
					t.listenMenu10235(obj, datas);
				}else if(t.c.menuId == 10236) { // 按钮监听-【员工个税税率表】
					t.listenMenu10236(obj, datas);
				}else if(t.c.menuId == 10237) { // 按钮监听-【岗位职级管理表】
					t.listenMenu10237(obj, datas);
				}else if(t.c.menuId == 10241) { // 按钮监听-【考勤管理】
					t.listenMenu10241(obj, datas);
				}else if(t.c.menuId == 10238) { // 按钮监听-【社保管理】
					t.listenMenu10238(obj, datas);
				}else if(t.c.menuId == 10239) { // 按钮监听-【医保管理】
					t.listenMenu10239(obj, datas);
				}else if(t.c.menuId == 10240) { // 按钮监听-【公积金管理】
					t.listenMenu10240(obj, datas);
				}else if(t.c.menuId == 10244) { // 按钮监听-【员工职级管理】
					t.listenMenu10244(obj, datas);
				}else if(t.c.menuId == 10245) { // 按钮监听-【公司信息管理】
					t.listenMenu10245(obj, datas);
				}else if(t.c.menuId == 10246) { // 按钮监听-【合作商银行账户管理】
					t.listenMenu10246(obj, datas);
				}else if(t.c.menuId == 10247) { // 按钮监听-【运营公司银行账户管理】
					t.listenMenu10247(obj, datas);
				}else if(t.c.menuId == 10248) { // 按钮监听-【员工银行账户管理】
					t.listenMenu10248(obj, datas);
				}else if(t.c.menuId == 10249) { // 按钮监听-【公司银行信息管理】
					t.listenMenu10249(obj, datas);
				}else if(t.c.menuId == 10253) { // 按钮监听-【物料名称维护】
					t.listenMenu10253(obj, datas);
				}else if(t.c.menuId == 10255) { // 按钮监听-【物料入库单】
					t.listenMenu10255(obj, datas);
				}else if(t.c.menuId == 10256) { // 按钮监听-【物料出库单】
					t.listenMenu10256(obj, datas);
				}else if(t.c.menuId == 10257) { // 按钮监听-【物料转移单】
					t.listenMenu10257(obj, datas);
				}else if(t.c.menuId == 10258) { // 按钮监听-【物料借用单】
					t.listenMenu10258(obj, datas);
				}else if(t.c.menuId == 10259) { // 按钮监听-【物料库存进出记录】
					t.listenMenu10259(obj, datas);
				}else if(t.c.menuId == 10261) { // 按钮监听-【部门账户管理】
					t.listenMenu10261(obj, datas);
				}else if(t.c.menuId == 10262) { // 按钮监听-【员工月度绩效信息】
					t.listenMenu10262(obj, datas);
				}else if(t.c.menuId == 10263) { // 按钮监听-【员工月度绩效申报】
					t.listenMenu10263(obj, datas);
				}else if(t.c.menuId == 10264) { // 按钮监听-【员工工资申请单】
					t.listenMenu10264(obj, datas);
				}else if(t.c.menuId == 10265) { // 按钮监听-【员工考勤信息表】
					t.listenMenu10265(obj, datas);
				}else if(t.c.menuId == 10266) { // 按钮监听-【员工工资条信息表】
					t.listenMenu10266(obj, datas);
				}else if(t.c.menuId == 10268) { // 按钮监听-【员工个税统计表】
					t.listenMenu10268(obj, datas);
				}else if(t.c.menuId == 10269) { // 按钮监听-【工资付款单】
					t.listenMenu10269(obj, datas);
				}else if(t.c.menuId == 10270) { // 按钮监听-【医保付款单】
					t.listenMenu10270(obj, datas);
				}else if(t.c.menuId == 10271) { // 按钮监听-【社保付款单】
					t.listenMenu10271(obj, datas);
				}else if(t.c.menuId == 10272) { // 按钮监听-【公积金付款单】
					t.listenMenu10272(obj, datas);
				}else if(t.c.menuId == 10273) { // 按钮监听-【个税付款单】
					t.listenMenu10273(obj, datas);
				}else if(t.c.menuId == 10277) { // 按钮监听-【物料库存冻结记录】
					t.listenMenu10277(obj, datas);
				}else if(t.c.menuId == 10278) { // 按钮监听-【预支类型维护】
					t.listenMenu10278(obj, datas);
				}else if(t.c.menuId == 10280) { // 按钮监听-【预支账户管理】
					t.listenMenu10280(obj, datas);
				}else if(t.c.menuId == 10281) { // 按钮监听-【预付台账明细】
					t.listenMenu10281(obj, datas);
				}else if(t.c.menuId == 10282) { // 按钮监听-【预支账户充值单】
					t.listenMenu10282(obj, datas);
				}else if(t.c.menuId == 10283) { // 按钮监听-【预支账户报销单】
					t.listenMenu10283(obj, datas);
				}else if(t.c.menuId == 10284) { // 按钮监听-【预支账户归还单】
					t.listenMenu10284(obj, datas);
				}else if(t.c.menuId == 10285) { // 按钮监听-【应付类型维护】
					t.listenMenu10285(obj, datas);
				}else if(t.c.menuId == 10286) { // 按钮监听-【应付账户管理】
					t.listenMenu10286(obj, datas);
				}else if(t.c.menuId == 10287) { // 按钮监听-【应付台账明细】
					t.listenMenu10287(obj, datas);
				}else if(t.c.menuId == 10288) { // 按钮监听-【应付账户支付】
					t.listenMenu10288(obj, datas);
				}else if(t.c.menuId == 10291) { // 按钮监听-【预支账户归还单】
					t.listenMenu10291(obj, datas);
				}else if(t.c.menuId == 10295) { // 按钮监听-【平台维护】
					t.listenMenu10295(obj, datas);
				}else if(t.c.menuId == 10296) { // 按钮监听-【资金登记单】
					t.listenMenu10296(obj, datas);
				}else if(t.c.menuId == 10297) { // 按钮监听-【合作商外币账户管理】
					t.listenMenu10297(obj, datas);
				}else if(t.c.menuId == 10298) { // 按钮监听-【透明计划申报】
					t.listenMenu10298(obj, datas);
				}else if(t.c.menuId == 10299) { // 按钮监听-【平台地区维护】
					t.listenMenu10299(obj, datas);
				}else if(t.c.menuId == 10300) { // 按钮监听-【国家信息维护】
					t.listenMenu10300(obj, datas);
				}else if(t.c.menuId == 10301) { // 按钮监听-【平台卖家管理】
					t.listenMenu10301(obj, datas);
				}else if(t.c.menuId == 10302) { // 按钮监听-【平台店铺管理】
					t.listenMenu10302(obj, datas);
				}else if(t.c.menuId == 10303) { // 按钮监听-【VAT付款账户管理】
					t.listenMenu10303(obj, datas);
				}else if(t.c.menuId == 10304) { // 按钮监听-【资金登记认领表】
					t.listenMenu10304(obj, datas);
				}else if(t.c.menuId == 10305) { // 按钮监听-【平台服务付款账户管理】
					t.listenMenu10305(obj, datas);
				}else if(t.c.menuId == 10306) { // 按钮监听-【预付款认领单】
					t.listenMenu10306(obj, datas);
				}else if(t.c.menuId == 10308) { // 按钮监听-【Amazon商品管理】
					t.listenMenu10308(obj, datas);
				}else if(t.c.menuId == 10310) { // 按钮监听-【存款账户管理】
					t.listenMenu10310(obj, datas);
				}else if(t.c.menuId == 10311) { // 按钮监听-【存款账户平台管理】
					t.listenMenu10311(obj, datas);
				}else if(t.c.menuId == 10312) { // 按钮监听-【资金认领单】
					t.listenMenu10312(obj, datas);
				}else if(t.c.menuId == 10313) { // 按钮监听-【运营公司表VPS信息】
					t.listenMenu10313(obj, datas);
				}else if(t.c.menuId == 10314) { // 按钮监听-【运营公司表品牌信息】
					t.listenMenu10314(obj, datas);
				}else if(t.c.menuId == 10315) { // 按钮监听-【运营公司表欧洲贸易合规】
					t.listenMenu10315(obj, datas);
				}else if(t.c.menuId == 10317) { // 按钮监听-【万里汇账号资金】
                    t.listenMenu10317(obj, datas);
                }else if(t.c.menuId == 10318) { // 按钮监听-【万里汇账号交易流水】
					t.listenMenu10318(obj, datas);
				}else if(t.c.menuId == 10319) { // 按钮监听-【万里汇货币兑换单】
					t.listenMenu10319(obj, datas);
				}else if(t.c.menuId == 10320) { // 按钮监听-【万里汇提款单】
					t.listenMenu10320(obj, datas);
				}else if(t.c.menuId == 10321) { // 按钮监听-【VAT申报】
					t.listenMenu10321(obj, datas);
				}else if(t.c.menuId == 10322) { // 按钮监听-【预付款退回申请】
					t.listenMenu10322(obj, datas);
				}else if(t.c.menuId == 10323) { // 按钮监听-【万里汇CNY付款单】
					t.listenMenu10323(obj, datas);
				}else if(t.c.menuId == 10325) { // 按钮监听-【C88文件管理】
					t.listenMenu10325(obj, datas);
				}else if(t.c.menuId == 10326) { // 按钮监听-【万里汇CNY计算汇率表】
					t.listenMenu10326(obj, datas);
				}else if(t.c.menuId == 10327) { // 按钮监听-【万里汇预付款退回】
					t.listenMenu10327(obj, datas);
				}else if(t.c.menuId == 10330) { // 按钮监听-【运营公司账户交易类型】
					t.listenMenu10330(obj, datas);
				}else if(t.c.menuId == 10331) { // 按钮监听-【万里汇补账单】
					t.listenMenu10331(obj, datas);
				}else if(t.c.menuId == 10332) { // 按钮监听-【万里汇预付款入账单】
					t.listenMenu10332(obj, datas);
				}else if(t.c.menuId == 10333) { // 按钮监听-【预付款归集明细】
					t.listenMenu10333(obj, datas);
				}else if(t.c.menuId == 10334) { // 按钮监听-【万里汇外币付款单】
					t.listenMenu10334(obj, datas);
				}else if(t.c.menuId == 10335) { // 按钮监听-【万里汇预付款对账单】
					t.listenMenu10335(obj, datas);
				}else if(t.c.menuId == 10337) { // 按钮监听-【财务工资小计部门维护】
					t.listenMenu10337(obj, datas);
				}else if(t.c.menuId == 10339) { // 按钮监听-【财务工资表-小计表（内嵌不显示）】
					t.listenMenu10339(obj, datas);
				}else if(t.c.menuId == 10340) { // 按钮监听-【财务工资表-汇总（内嵌不显示）】
					t.listenMenu10340(obj, datas);
				}else if(t.c.menuId == 10342) { // 按钮监听-【财务社保表-汇总（内嵌不显示）】
					t.listenMenu10342(obj, datas);
				}else if(t.c.menuId == 10343) { // 按钮监听-【财务社保表-小计表（内嵌不显示）】
					t.listenMenu10343(obj, datas);
				}else if(t.c.menuId == 10345) { // 按钮监听-【财务医保表-汇总（内嵌不显示）】
					t.listenMenu10345(obj, datas);
				}else if(t.c.menuId == 10346) { // 按钮监听-【财务医保表-小计表（内嵌不显示）】
					t.listenMenu10346(obj, datas);
				}else if(t.c.menuId == 10348) { // 按钮监听-【财务公积金表-汇总（内嵌不显示）】
					t.listenMenu10348(obj, datas);
				}else if(t.c.menuId == 10349) { // 按钮监听-【财务公积金表-小计表（内嵌不显示）】
					t.listenMenu10349(obj, datas);
				}else if(t.c.menuId == 10351) { // 按钮监听-【数据库同步管理】
					t.listenMenu10351(obj, datas);
				}else if(t.c.menuId == 10352) { // 按钮监听-【职能费用申请】
					t.listenMenu10352(obj, datas);
				}else if(t.c.menuId == 10353) { // 按钮监听-【付款申请单】
					t.listenMenu10353(obj, datas);
				}else if(t.c.menuId == 10354) { // 按钮监听-【财务交易流水】
					t.listenMenu10354(obj, datas);
				}else if(t.c.menuId == 10356) { // 按钮监听-【财务交易类型】
					t.listenMenu10356(obj, datas);
				}else if(t.c.menuId == 10358) { // 按钮监听-【公司银行账户实时资金管理】
					t.listenMenu10358(obj, datas);
				}else if(t.c.menuId == 10359) { // 按钮监听-【通告信息维护】
					t.listenMenu10359(obj, datas);
				}else if(t.c.menuId == 10360) { // 按钮监听-【费用划拨单】
					t.listenMenu10360(obj, datas);
				}else if(t.c.menuId == 10361) { // 按钮监听-【费用结算单】
					t.listenMenu10361(obj, datas);
				}else if(t.c.menuId == 10362) { // 按钮监听-【费用结算返还单】
					t.listenMenu10362(obj, datas);
				}else if(t.c.menuId == 10363) { // 按钮监听-【运营公司预付款管理】
					t.listenMenu10363(obj, datas);
				}else if(t.c.menuId == 10364) { // 按钮监听-【运营电子发票开票单】
					t.listenMenu10364(obj, datas);
				}else if(t.c.menuId == 10365) { // 按钮监听-【运营形式发票开票单】
					t.listenMenu10365(obj, datas);
				}else if(t.c.menuId == 10368) { // 按钮监听-【采购合同单】
					t.listenMenu10368(obj, datas);
				}else if(t.c.menuId == 10369) { // 按钮监听-【预约采购管理】
					t.listenMenu10369(obj, datas);
				}else if(t.c.menuId == 10370) { // 按钮监听-【预约采购库】
					t.listenMenu10370(obj, datas);
				}else if(t.c.menuId == 10371) { // 按钮监听-【采购预入库】
					t.listenMenu10371(obj, datas);
				}else if(t.c.menuId == 10373) { // 按钮监听-【商品组装单】
					t.listenMenu10373(obj, datas);
				}else if(t.c.menuId == 10374) { // 按钮监听-【采购合同管理】
					t.listenMenu10374(obj, datas);
				}else if(t.c.menuId == 10375) { // 按钮监听-【组装报错单】
					t.listenMenu10375(obj, datas);
				}else if(t.c.menuId == 10376) { // 按钮监听-【采购入库】
					t.listenMenu10376(obj, datas);
				}else if(t.c.menuId == 10377) { // 按钮监听-【质检上架】
					t.listenMenu10377(obj, datas);
				}else if(t.c.menuId == 10382) { // 按钮监听-【库存管理】
					t.listenMenu10382(obj, datas);
				}else if(t.c.menuId == 10383) { // 按钮监听-【仓库管理】
					t.listenMenu10383(obj, datas);
				}else if(t.c.menuId == 10384) { // 按钮监听-【库区管理】
					t.listenMenu10384(obj, datas);
				}else if(t.c.menuId == 10385) { // 按钮监听-【发票预核销单】
					t.listenMenu10385(obj, datas);
				}else if(t.c.menuId == 10386) { // 按钮监听-【货位管理】
					t.listenMenu10386(obj, datas);
				}else if(t.c.menuId == 10387) { // 按钮监听-【采购付款单】
					t.listenMenu10387(obj, datas);
				}else if(t.c.menuId == 10388) { // 按钮监听-【发票登记单】
					t.listenMenu10388(obj, datas);
				}else if(t.c.menuId == 10389) { // 按钮监听-【发票管理】
					t.listenMenu10389(obj, datas);
				}else if(t.c.menuId == 10390) { // 按钮监听-【库存流水】
					t.listenMenu10390(obj, datas);
				}else if(t.c.menuId == 10391) { // 按钮监听-【亚马逊仓库地址管理】
					t.listenMenu10391(obj, datas);
				}else if(t.c.menuId == 10392) { // 按钮监听-【报关单】
					t.listenMenu10392(obj, datas);
				}else if(t.c.menuId == 10394) { // 按钮监听-【管理交易类型】
					t.listenMenu10394(obj, datas);
				}else if(t.c.menuId == 10395) { // 按钮监听-【公司账户资金转账】
					t.listenMenu10395(obj, datas);
				}else if(t.c.menuId == 10402) { // 按钮监听-【采购计划】
					t.listenMenu10402(obj, datas);
				}else if(t.c.menuId == 10403) { // 按钮监听-【1688铺货】
					t.listenMenu10403(obj, datas);
				}else if(t.c.menuId == 10405) { // 按钮监听-【采购订单（内嵌不显示）】
					t.listenMenu10405(obj, datas);
				}else if(t.c.menuId == 10406) { // 按钮监听-【采购付款（内嵌不显示）】
					t.listenMenu10406(obj, datas);
				}else if(t.c.menuId == 10409) { // 按钮监听-【采购订单完成（内嵌不显示）】
					t.listenMenu10409(obj, datas);
				}else if(t.c.menuId == 10416) { // 按钮监听-【线上采购入库（内嵌不显示）】
					t.listenMenu10416(obj, datas);
				}else if(t.c.menuId == 10419) { // 按钮监听-【线上质检上架（内嵌不显示）】
					t.listenMenu10419(obj, datas);
				}else if(t.c.menuId == 10420) { // 按钮监听-【线上组装报错（内嵌不显示）】
					t.listenMenu10420(obj, datas);
				}else if(t.c.menuId == 10423) { // 按钮监听-【线上商品组装(内嵌不展示)】
					t.listenMenu10423(obj, datas);
				}else if(t.c.menuId == 10425) { // 按钮监听-【线上采购退货单】
					t.listenMenu10425(obj, datas);
				}else if(t.c.menuId == 10426) { // 按钮监听-【手工组装单】
					t.listenMenu10426(obj, datas);
				}else if(t.c.menuId == 10427) { // 按钮监听-【手工拆装单】
					t.listenMenu10427(obj, datas);
				}else if(t.c.menuId == 10430) { // 按钮监听-【库存调拨单】
					t.listenMenu10430(obj, datas);
				}else if(t.c.menuId == 10432) { // 按钮监听-【货位转移单】
					t.listenMenu10432(obj, datas);
				}else if(t.c.menuId == 10407) { // 按钮监听-【采购地址维护】
					t.listenMenu10407(obj, datas);
				}else if(t.c.menuId == 10410) { // 按钮监听-【入账申请单】
					t.listenMenu10410(obj, datas);
				}else if(t.c.menuId == 10413) { // 按钮监听-【费用划拨单（管理）】
					t.listenMenu10413(obj, datas);
				}else if(t.c.menuId == 10414) { // 按钮监听-【预约调拨发布单】
					t.listenMenu10414(obj, datas);
				}else if(t.c.menuId == 10421) { // 按钮监听-【库存出库】
					t.listenMenu10421(obj, datas);
				}else if(t.c.menuId == 10422) { // 按钮监听-【库存入库】
					t.listenMenu10422(obj, datas);
				}else if(t.c.menuId == 10443) { // 按钮监听-【HW商品库】
					t.listenMenu10443(obj, datas);
				}else if(t.c.menuId == 10444) { // 按钮监听-【HW平台信息维护】
					t.listenMenu10444(obj, datas);
				}else if(t.c.menuId == 10446) { // 按钮监听-【HW商品渠道库存】
					t.listenMenu10446(obj, datas);
				}else if(t.c.menuId == 10445) { // 按钮监听-【HW商品选品库】
					t.listenMenu10445(obj, datas);
				}else if(t.c.menuId == 10447) { // 按钮监听-【HW商品listing库】
					t.listenMenu10447(obj, datas);
				}else if(t.c.menuId == 10448) { // 按钮监听-【HW采购计划】
					t.listenMenu10448(obj, datas);
				}else if(t.c.menuId == 10449) { // 按钮监听-【HW采购结算】
					t.listenMenu10449(obj, datas);
				}else if(t.c.menuId == 10450) { // 按钮监听-【HW采购发货】
					t.listenMenu10450(obj, datas);
				}else if(t.c.menuId == 10452) { // 按钮监听-【库存调拨单】
					t.listenMenu10452(obj, datas);
				}else if(t.c.menuId == 20454) { // 按钮监听-【HW商品库导入详情】
					t.listenMenu20454(obj, datas);
				}else if(t.c.menuId == 20457) { // 按钮监听-【HW商品listing库导入详情】
					t.listenMenu20457(obj, datas);
				}else if(t.c.menuId == 20463) { // 按钮监听-【万里汇API付款操作记录表】
					t.listenMenu20463(obj, datas);
				}else if(t.c.menuId == 20470) { // 按钮监听-【行单击列表】
					t.listenMenu20470(obj, datas);
				}else if(t.c.menuId == 10434) { // 按钮监听-【FBA计划单】
					t.listenMenu10434(obj, datas);
				}else if(t.c.menuId == 10435) { // 按钮监听-【FBA装箱单】
					t.listenMenu10435(obj, datas);
				}else if(t.c.menuId == 10437) { // 按钮监听-【物流方式维护】
					t.listenMenu10437(obj, datas);
				}else if(t.c.menuId == 20452) { // 按钮监听-【FBA取消单(内嵌不展示)】
					t.listenMenu20452(obj, datas);
				}else if(t.c.menuId == 20453) { // 按钮监听-【FBA发货单(内嵌不展示旧)】
					t.listenMenu20453(obj, datas);
				}else if(t.c.menuId == 20462) { // 按钮监听-【FBA完成单(内嵌不展示)】
					t.listenMenu20462(obj, datas);
				}else if(t.c.menuId == 20458) { // 按钮监听-【运输类型维护】
					t.listenMenu20458(obj, datas);
				}else if(t.c.menuId == 20460) { // 按钮监听-【预估费用详情】
					t.listenMenu20460(obj, datas);
				}else if(t.c.menuId == 20472) { // 按钮监听-【FBA计划单】
					t.listenMenu20472(obj, datas);
				}else if(t.c.menuId == 20471) { // 按钮监听-【FBA装箱单】
					t.listenMenu20471(obj, datas);
				}else if(t.c.menuId == 20474) { // 按钮监听-【FBA发货单(内嵌不展示)】
					t.listenMenu20474(obj, datas);
				}else if(t.c.menuId == 20477) { // 按钮监听-【FBA完成单(内嵌不展示)】
					t.listenMenu20477(obj, datas);
				}else if(t.c.menuId == 20479) { // 按钮监听-【物流计划单(内嵌不展示)】
					t.listenMenu20479(obj, datas);
				}else if(t.c.menuId == 20480) { // 按钮监听-【物流渠道维护】
					t.listenMenu20480(obj, datas);
				}else if(t.c.menuId == 20481) { // 按钮监听-【物流订单(内嵌不显示)】
					t.listenMenu20481(obj, datas);
				}else if(t.c.menuId == 20482) { // 按钮监听-【物流渠道详情】
					t.listenMenu20482(obj, datas);
				}else if(t.c.menuId == 20484) { // 按钮监听-【物流服务商】
					t.listenMenu20484(obj, datas);
				}else if(t.c.menuId == 20488) { // 按钮监听-【物流对账（内嵌不展示）】
					t.listenMenu20488(obj, datas);
				}else if(t.c.menuId == 20489) { // 按钮监听-【物流付款单（关税费）】
					t.listenMenu20489(obj, datas);
				}else if(t.c.menuId == 20490) { // 按钮监听-【物流付款单（物流费）】
					t.listenMenu20490(obj, datas);
				}else if(t.c.menuId == 20496) { // 按钮监听-【运营数据统计表】
					t.listenMenu20496(obj, datas);
				}else if(t.c.menuId == 20497) { // 按钮监听-【数据统计店铺清单】
					t.listenMenu20497(obj, datas);
				}else if(t.c.menuId == 20498) { // 按钮监听-【商品库批量导入详情（内嵌不显示）】
					t.listenMenu20498(obj, datas);
				}else if(t.c.menuId == 20499) { // 按钮监听-【商品库批量导入-总进度查询（内嵌不显示）】
					t.listenMenu20499(obj, datas);
				}else if(t.c.menuId == 20502) { // 按钮监听-【采购计划】
					t.listenMenu20502(obj, datas);
				}
			});
	    },
	    listenMenu17: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-refresh-order':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
				    var index = layer.open({
				        type: 2,
				        area: [w+'px', h +'px'],
				        fix: true,
				        maxmin: false,
				        shadeClose: true,
				        shade:0.4,
				        title: "刷新店铺订单",
				        content: '/web/business/tpAmazonShopOrder/toRefreshOrder'
				    });
					break;
				}
				case 'event-export-update':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tpAmazonShopOrder/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-export':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
				    var index = layer.open({
				        type: 2,
				        area: [w+'px', h +'px'],
				        fix: true,
				        maxmin: false,
				        shadeClose: true,
				        shade:0.4,
				        title: "导出表格",
				        content: '/web/business/tpYsbExportLog/toExport?menuId=17'
				    });
					break;
				}
			};
	    },
	    listenMenu18: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcoDayShop/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
	    },
	    listenMenu19: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tpAmazonShopOrderDaily/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
	    },
	    listenMenu20: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-addRunningBack':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选择一条数据');
					} else {
						var w=($(window).width()*0.9);
						var h=($(window).height() - 50);
						var index = layer.open({
							type: 2,
							area: [w+'px', h +'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade:0.4,
							title: "生成费用返还单",
							content: '/web/finance/tcwRunningBack/toAddRunningBack?id=' + datas[0].id
					   });
					}
					break;
				}
				case 'event-to-export':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
				    var index = layer.open({
				        type: 2,
				        area: [w+'px', h +'px'],
				        fix: true,
				        maxmin: false,
				        shadeClose: true,
				        shade:0.4,
				        title: "导出表格",
				        content: '/web/business/tpYsbExportLog/toExport?menuId=20'
				    });
					break;
				}
			};
	    },
	    listenMenu27: function(obj, datas) {
	    	var t = this;
	    	//t.gridObj.getConds();
			switch(obj.event){
				case 'event-to-export'://导出
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "导出表格",
						content: '/web/business/tpYsbExportLog/toExport?menuId=27'
					});
					break;
				}
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tpProductBasis/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-addBatch'://批量新增
				{
					t.openImport(20498); // 导入的菜单ID
					break;
				}
				case 'event-to-importDetail'://批量新增导入详情
				{
					var w = ($(window).width() * 0.9);
					var h = ($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w + 'px', h + 'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade: 0.4,
						title: "批量导入详情",
						content: '/indexCommonOfMenu?menuId=20499&_condFields=infoType&_condValues=3'
					});
					break;
				}
			};
	    },
		listenMenu28: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-export'://导出
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "导出表格",
						content: '/web/business/tpYsbExportLog/toExport?menuId=28'
					});
					break;
				}
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tpProductBasisChildNew/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
	    },
	    listenMenu29: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-add': {
					var w = ($(window).width() * 0.9);
					var h = ($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w + 'px', h + 'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade: 0.4,
						title: "新增商品",
						content: '/web/business/tpProductXP/toAdd'
					});
					break;
				}
				case 'event-to-edit': {
					if (datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if (datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w = ($(window).width() * 0.9);
						var h = ($(window).height() - 50);
						var index = layer.open({
							type: 2, area: [w + 'px', h + 'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade: 0.4,
							title: "修改",
							content: '/web/business/tpProductXP/toEdit?id=' + datas[0].id
						});
					}
					break; 
				}
				case 'event-to-delete': {
					if (datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var _list = [];
						for (var i = 0; i < datas.length; i++) {
							_list[i] = datas[i].id;
						}
						layer.confirm('确定要删除吗？', { icon: 3 }, function() {
							layer.msg('处理中', { icon: 16, shade: 0.01 });
							$.ajax({
								url: '/api/inter/tpProductXPdx/deleteTrue',
								data: "list=" + _list,
								type: 'POST',
								async: true,
								success: function(res) {
									layer.close();
									location.reload();
									layer.msg(res.msg);
								}, error: function() {
									layer.close();
									layer.msg("删除失败，请稍后再试！", { icon: 2 });
								}
							});
						}, function() {
						});
					}
					break;
				}
			};
	    },
	    listenMenu30: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					var w = ($(window).width() * 0.9);
					var h = ($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w + 'px', h + 'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade: 0.4,
						title: "新增商品",
						content: '/web/business/tpProductXP/toAdd'
					});
					break;
				}
				case 'event-to-edit':
				{
					if (datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if (datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w = ($(window).width() * 0.9);
						var h = ($(window).height() - 50);
						var index = layer.open({
							type: 2,
							area: [w + 'px', h + 'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade: 0.4,
							title: "修改",
							content: '/web/business/tpProductXP/toEdit?id=' + datas[0].id
						});
					}
					break;
				}
				case 'event-to-delete':
				{
					if (datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var _list = [];
						for (var i = 0; i < datas.length; i++) {
							_list[i] = datas[i].id;
						}
						layer.confirm('确定要删除吗？', {
							icon: 3
						}, function() {
							layer.msg('处理中', {
								icon: 16,
								shade: 0.01
							});
							$.ajax({
								url: '/api/inter/tpProductXPyx/deleteTrue',
								data: "list=" + _list,
								type: 'POST',
								async: true,
								success: function(res) {
									layer.close();
									location.reload();
									layer.msg(res.msg);
								},
								error: function() {
									layer.close();
									layer.msg("删除失败，请稍后再试！", {
										icon: 2
									});
								}
							});
						}, function() {});
					}
					break;
				}
			};
	    },
	    listenMenu32: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-add': {
					var w = ($(window).width() * 0.9);
					var h = ($(window).height() - 50);
					var index = layer.open({
						type: 2, area: [w + 'px', h + 'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade: 0.4,
						title: "新增商品",
						content: '/web/business/tpProductCarefullyChosenNew/toAdd'
					});
					break;
				}
			};
	    },
	    listenMenu37: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
				    var index = layer.open({
				        type: 2,
				        area: [w+'px', h +'px'],
				        fix: true,
				        maxmin: false,
				        shadeClose: true,
				        shade:0.4,
				        title: "新增角色",
				        content: '/web/sys/ysRole/toAdd'
				    });
					break;
				}
				case 'event-to-edit':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w=($(window).width()*0.9);
						var h=($(window).height() - 50);
					    var index = layer.open({
					        type: 2,
					        area: [w+'px', h +'px'],
					        fix: true,
					        maxmin: false,
					        shadeClose: true,
					        shade:0.4,
					        title: "编辑",
					        content: '/web/sys/ysRole/toEdit?id=' + datas[0].id
					    });
					}
					break;
				}
			};
	    },
	    listenMenu38: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
				    var index = layer.open({
				        type: 2,
				        area: [w+'px', h +'px'],
				        fix: true,
				        maxmin: false,
				        shadeClose: true,
				        shade:0.4,
				        title: "新增",
				        content: '/web/sys/tsUserInfo/toAdd'
				    });
					break;
				}
				case 'event-to-batch-change-org':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var ids = '';
						for(var i = 0 ;i < datas.length; i++){
							ids += datas[i].id + ',';
						}
						var w=($(window).width()*0.9);
						var h=($(window).height() - 50);
					    var index = layer.open({
					        type: 2,
					        area: [w+'px', h +'px'],
					        fix: true,
					        maxmin: false,
					        shadeClose: true,
					        shade:0.4,
					        title: "批量变更组织机构",
					        content: '/web/sys/tsUserInfo/toBatchChangeOrg?ids=' + ids.substring(0, ids.length - 1)
					    });
					}
					break;
				}
			};
	    },
	    listenMenu41: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
				    var index = layer.open({
				        type: 2,
				        area: [w+'px', h +'px'],
				        fix: true,
				        maxmin: false,
				        shadeClose: true,
				        shade:0.4,
				        title: "新增流程模型",
				        content: '/web/flow/yspModel/toAdd'
				    });
					break;
				}
			};
	    },
	    listenMenu47: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-reset':
				{
					layer.open({
						title:'重新统计数据',
						type: 2,
						area: ['600px', '400px'],
						fix: true, maxmin: false, shadeClose: true, shade:0.4,shade:0.5,
						content:'/web/business/tpTimeCheck/toTimeCheckRefresh'
					});
					break;
				}
			};
	    },
	    listenMenu51: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					/*
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
				    var index = layer.open({
				        type: 2,
				        area: [w+'px', h +'px'],
				        fix: true,
				        maxmin: false,
				        shadeClose: true,
				        shade:0.4,
				        title: "新增运营公司备案",
				        content: '/web/hr/thrOperateCompanyBeian/toAdd'
				    });
					 */
					t.openUrl("运营公司备案 - 新增","/web/hr/thrOperateCompanyBeian/toAdd",1);
					break;
				}
				case 'event-to-addByCanvassApply':
				{
					t.openUrl("运营公司备案 - 调取","/web/hr/thrOperateCompanyBeian/toAddByCanvassApply",1);
					break;
				}
				case 'event-to-edit':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var canvassApplyItemId = datas[0].canvassApplyItemId;//招商申请表子表
						if(canvassApplyItemId==undefined || canvassApplyItemId==null || canvassApplyItemId==''){//若不是调取招商申请表子表
							t.openUrl("运营公司备案编辑 - "+datas[0].bid,"/web/hr/thrOperateCompanyBeian/toEdit?bid="+datas[0].bid,1);
						}else {
							t.openUrl("运营公司备案编辑 - "+datas[0].bid,"/web/hr/thrOperateCompanyBeian/toEditByCanvassApply?bid="+datas[0].bid,1);
						}
					}
					break;
				}
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/thrOperateCompanyBeian/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
	    },
	    listenMenu52: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-editOperator':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w=($(window).width()*0.9);
						var h=($(window).height() - 50);
					    var index = layer.open({
					        type: 2,
					        area: [w+'px', h +'px'],
					        fix: true,
					        maxmin: false,
					        shadeClose: true,
					        shade:0.4,
					        title: "修改运营人",
					        content: '/web/hr/thrOperateCompanyInfo/toEditOperator?id=' + datas[0].id
					    });
					}
					break;
				}
				case 'event-to-editStatus':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w=($(window).width()*0.9);
						var h=($(window).height() - 50);
					    var index = layer.open({
					        type: 2,
					        area: [w+'px', h +'px'],
					        fix: true,
					        maxmin: false,
					        shadeClose: true,
					        shade:0.4,
					        title: "修改运营状态",
					        content: '/web/hr/thrOperateCompanyInfo/toEditStatus?id=' + datas[0].id
					    });
					}
					break;
				}
				case 'event-to-batch-change-org':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var ids = '';
						for(var i = 0 ;i < datas.length; i++){
							ids += datas[i].id + ',';
						}
						var w=($(window).width()*0.9);
						var h=($(window).height() - 50);
					    var index = layer.open({
					        type: 2,
					        area: [w+'px', h +'px'],
					        fix: true,
					        maxmin: false,
					        shadeClose: true,
					        shade:0.4,
					        title: "批量变更组织机构",
					        content: '/web/hr/thrOperateCompanyInfo/toBatchChangeOrg?ids=' + ids.substring(0, ids.length - 1)
					    });
					}
					break;
				}
			};
	    },
	    listenMenu53: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-add': { 
					var w=($(window).width()*0.9); 
					var h=($(window).height() - 50); 
					var index = layer.open({ 
					type: 2, area: [w+'px', h +'px'], fix: true, maxmin: false, shadeClose: true, shade:0.4, title: "新增部门员工评价", 
					content: '/web/business/tpDeptUserPoint/toAdd'
					 }); 
					break; 
					}
				case 'event-to-edit':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w=($(window).width()*0.9);
						var h=($(window).height() - 50);
						var index = layer.open({
							type: 2,
							area: [w+'px', h +'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade:0.4,
							title: "编辑",
							content: '/web/business/tpDeptUserPoint/toDeptUserPointEditOrDetail?id=' + datas[0].id + '&type=1'
					   });
					}
					break;
				}
			};
	    },
	    listenMenu54: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					 var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "新增",
						content: '/web/business/tpShopRegisterPhaseSet/toAdd'
					});
					break;
				}
			};
	    },
	    listenMenu55: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-add':
				{

					window.matchValuesAfterModalSelectRadio = function(colCode, data, extraData) {
						console.log('data =',data);
						var chooseId = data.id;
						/*
						for( var i=0;i<data.length;i++ ){
							_list[i]=data[i].id;
						}
						 */
						layui.layer.msg('处理中', {
							icon: 16,
							shade: 0.01
						});
						$.ajax({
							url: '/api/inter/tpShopRegisterPhaseRecord/add',
							data: {chooseId:chooseId},
							type: 'POST',
							async: false,
							success: function (result) {
								if(result.code=='0'){
									layer.close();
									//刷新列表
									setTimeout(function(){
										location.reload();
									}, 1000);
									//return;
								}else {//失败
									layer.close();
									layer.msg(result.msg, {icon: 2});
								}
							},
							error: function () {
								layer.close();
								layer.msg("新增失败，请稍后再试！", {icon: 2});
							}
						});
					};
					layui.YsModal.init({modalKey: 'THR_OperateCompanyApply_NO_ShopRegisterPhaseRecord', colCode: 'aaaa', parentObj: window});
					break;
				}
				case 'event-to-chooseShop':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w=($(window).width()*0.9);
						var h=($(window).height() - 50);
						var index = layer.open({
							type: 2,
							area: [w+'px', h +'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade:0.4,
							title: "选择店铺",
							content: '/web/business/tpShopRegisterPhaseRecord/toChooseShop?id=' + datas[0].id + '&phaseNum=' + datas[0].phaseNum+ '&vGsBm=' + datas[0].vGsBm
					   });
					}
					break;
				}
				case 'event-to-finish':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var _list = [];
						for(var i=0;i<datas.length;i++){
							if(datas[i].workTime==undefined || datas[i].workTime==null || datas[i].workTime==''){
								_list.push(datas[i].id);
							}
						}
						var finishMsg = '确定要完成选中的跟踪单吗？';
						if(_list==null || _list.length == 0 || _list.length == []){
							finishMsg = '选中的跟踪单已完成，请重新选择！';
							layer.msg(finishMsg, {icon: 0});
							return;
						}
						if(_list!=null && _list.length < datas.length){
							finishMsg = '您选中的跟踪单有部分已完成，完成时将不会更改这些信息，是否继续？';
						}
						layer.confirm(finishMsg, {icon: 3}, function () {
							layer.msg('处理中', {
								icon: 16,shade: 0.01
							});
							var ids = '';
							for(var i=0;i<_list.length;i++){
								if(i==0){
									ids = _list[i];
								}else {
									ids = ids + ',' +_list[i];
								}
							}
							$.ajax({
								url: '/api/inter/tpShopRegisterPhaseRecord/finishRecord',
								data: {ids: ids},
								type: 'POST',
								async: true,
								success: function (res) {
									layer.close();
									layer.msg(res.msg);
									if(res.code==0){
										setTimeout(function(){location.reload();}, 2000);
									}
								},
								error: function () {
									layer.close();
									layer.msg("处理失败，请稍后再试！", {icon: 2});
								}
							});
								
						}, function () {});
						
					}
					break;
				}
				case 'event-to-delete':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var _list = [];
						for(var i=0;i<datas.length;i++){
							_list[i]=datas[i].operateCompanyId;
						}
						
						layer.confirm('确定要删除选中的跟踪单吗？', {icon: 3}, function () {
							layer.msg('处理中', {
								icon: 16,shade: 0.01
							});
							var ids = '';
							for(var i=0;i<_list.length;i++){
								if(i==0){
									ids = _list[i];
								}else {
									ids = ids + ',' +_list[i];
								}
							}
							$.ajax({
								url: '/api/inter/tpShopRegisterPhaseRecord/deleteTrue',
								data: {ids: ids},
								type: 'POST',
								async: true,
								success: function (res) {
									layer.close();
									location.reload();
									layer.msg(res.msg);
								},
								error: function () {
									layer.close();
									layer.msg("删除失败，请稍后再试！", {icon: 2});
								}
							});
								
						}, function () {});
						
					}
					break;
				}
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tpShopRegisterPhaseRecord/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
	    },
	    listenMenu57: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					 var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "新增",
						content: '/web/business/tpShopRegisterPhaseSet/toAdd'
					});
					break;
				}
			};
	    },
	    listenMenu59: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					 var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "新增",
						content: '/web/base/tbRepeatWord/toAdd'
					});
					break;
				}
				case 'event-to-batch-import':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					 var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "新增",
						content: '/web/base/tbRepeatWord/toBatchImport'
					});
					break;
				}
			};
	    },
		listenMenu63: function(obj, datas) {
			var t = this;
			switch(obj.event){
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tpShopAnalysisReportForms/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
		listenMenu64: function(obj, datas) {
			var t = this;
			switch(obj.event){
				case 'event-to-updateFzed':
				{
					if(datas.length == 0) {
						return layer.alert('尚未选中数据');
					}else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w = ($(window).width() * 0.3);
						var h = ($(window).height() * 0.4);
						layer.open({
							shadeClose:true,
							area: [w + 'px', h + 'px'],
							title: '负债额度',
							content: `
								<form class="layui-form">
								  <div class="layui-form-item">
								  	 <label class="layui-form-label">公司编码</label>
    								 <div class="layui-input-block">
									 	<input type="text" class="layui-input" value="`+datas[0].vGsBm+`" readonly>
									 </div>
								  </div>
								  <div class="layui-form-item">
									<label class="layui-form-label">公司简称</label>
									<div class="layui-input-block">
									  <input type="text" value="`+datas[0].vGsJc+`" readonly class="layui-input">
									</div>
								  </div>
								  <div class="layui-form-item">
									<label class="layui-form-label">负债额度</label>
									<div class="layui-input-block">
									  <input type="number" name="fFzEd" id="fFzEd" lay-verify="required" placeholder="请输入负债额度" value="`+datas[0].fFzEd+`" class="layui-input">
									</div>
								  </div>
								</form>
							`,
							success: function(layero, index) {},
							yes: function (index, layero) {
								layer.msg('处理中', {
									icon: 16,shade: 0.01
								});
								var fFzEd = $('#fFzEd').val();
								var vgsbm = datas[0].vGsBm;
								$.ajax({
									type: "POST",
									url: '/api/inter/tcwAccountCountForCompany/updateFzed',
									data: {
										vgsbm: vgsbm,
										fFzEd:fFzEd,
									},
									success: function (data) {
										console.log('data',data);
										if (data.code == 0) {
											layer.msg(data.msg);
											setTimeout(function(){
												layer.closeAll();
												location.reload();
											}, 3000);
										} else {
											layer.closeAll();
											layer.msg(data.msg);
										}
									}
								});
							}
						});
					}


					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwAccountCountForCompany/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
		listenMenu65: function(obj, datas) {
			var t = this;
			switch(obj.event){
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tpShopAnalysisReportForms/exportByCompany',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
		listenMenu66: function(obj, datas) {
			var t = this;
			switch(obj.event){
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tpShopAnalysisReportForms/exportByUser',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
	    listenMenu67: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
				    var index = layer.open({
				        type: 2,
				        area: [w+'px', h +'px'],
				        fix: true,
				        maxmin: false,
				        shadeClose: true,
				        shade:0.4,
				        title: "新增角色",
				        content: '/web/kefu/tkfKnow/toAdd'
				    });
					break;
				}
				case 'event-to-edit':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w=($(window).width()*0.9);
						var h=($(window).height() - 50);
					    var index = layer.open({
					        type: 2,
					        area: [w+'px', h +'px'],
					        fix: true,
					        maxmin: false,
					        shadeClose: true,
					        shade:0.4,
					        title: "编辑",
					        content: '/web/kefu/tkfKnow/toEdit?id=' + datas[0].id
					    });
					}
					break;
				}
			};
	    },
	    listenMenu70: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-flow':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w=($(window).width()*0.9);
						var h=($(window).height() - 50);
					    var index = layer.open({
					        type: 2,
					        area: [w+'px', h +'px'],
					        fix: true,
					        maxmin: false,
					        shadeClose: true,
					        shade:0.4,
					        title: "编辑",
					        content: '/web/finance/tcwRunningBack/toFlow?bid=' + datas[0].pbid
					    });
					}
					break;
				}
				case 'event-to-add':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					 var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "新增",
						content: '/web/finance/tcwRunningBack/toAdd'
					});
					break;
				}
				case 'event-to-delete':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var row = datas[0];
						layui.layer.confirm("删除后不可恢复，确定彻底删除？",{
							btn: ['确定', '取消']
						}, function (index) {
							$.ajax({
								type: "POST",
								url: '/api/inter/tcwRunningBack/delete',
								data: {id: row.pid},
								success: function (data) {
									if (data.code == 0) {
										reloadTableOfList();
									} else {
										alert(data.msg);
									}
								}
							});
							layer.close(index);
						});
					}
					break;
				}
				case 'event-to-flow-history':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var row = datas[0];
			        	var w=($(window).width()*0.9);
			        	var h=($(window).height() - 50);
			            layer.open({
			                type: 2,
			                area: [w+'px', h +'px'],
			                fix: true,
			                maxmin: false,
			                shadeClose: true,
			                shade:0.4,
			                title: "流程跟踪",
			                content: '/web/flow/ysp/toAudit?bid=' + row.pbid
			            });
					}
					break;
				}
			};
	    },
	    listenMenu71: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-setCoefficient':
				{
					var index = layer.open({
						title:'设置目标系数',
					    type: 2,
					    area: ['600px', '400px'],
					    fix: true, maxmin: false, shadeClose: true, shade:0.4,shade:0.5,
					    content:'/web/business/tpAnalysisDailyTargetSet/toSetCoefficient?setType=0'
					});
					break;
				}
				case 'event-to-setDailyTarget':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var index = layer.open({
							title:'设置日目标',
							type: 2,
							area: ['600px', '400px'],
							fix: true, maxmin: false, shadeClose: true, shade:0.4,shade:0.5,
							content:'/web/business/tpAnalysisDailyTargetSet/toSetDailyTarget?id=' + datas[0].id + '&dailyTarget='+ datas[0].dailyTarget+ '&setType=0'
						});
					}
					break;
				}
			};
	    },
		listenMenu72: function(obj, datas) {
			var t = this;
			switch(obj.event){
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tpAnalysisDailyTarget/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
	    listenMenu73: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-setCoefficient':
				{
					var index = layer.open({
						title:'设置目标系数',
					    type: 2,
					    area: ['600px', '400px'],
					    fix: true, maxmin: false, shadeClose: true, shade:0.4,shade:0.5,
					    content:'/web/business/tpAnalysisDailyTargetSet/toSetCoefficient?setType=1'
					});
					break;
				}
				case 'event-to-setDailyTarget':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var index = layer.open({
							title:'设置日目标',
							type: 2,
							area: ['600px', '400px'],
							fix: true, maxmin: false, shadeClose: true, shade:0.4,shade:0.5,
							content:'/web/business/tpAnalysisDailyTargetSet/toSetDailyTarget?id=' + datas[0].id + '&dailyTarget='+ datas[0].elaborateDailyTarget+ '&setType=1'
						});
					}
					break;
				}
			};
	    },
		listenMenu74: function(obj, datas) {
			var t = this;
			switch(obj.event){
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tpAnalysisDailyTarget/exportByElaborate',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
	    listenMenu76: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
				    var index = layer.open({
				        type: 2,
				        area: [w+'px', h +'px'],
				        fix: true,
				        maxmin: false,
				        shadeClose: true,
				        shade:0.4,
				        title: "新增",
				        content: '/web/kefu/tpGaugeMaintenance/toAdd'
				    });
					break;
				}
				case 'event-to-edit':
	            {
	                if(datas.length == 0) {
	                    layer.alert('尚未选中数据');
	                } else if(datas.length > 1) {
	                    layer.alert('只能选中一行数据');
	                } else {
	                    var w=($(window).width()*0.9);
	                    var h=($(window).height() - 50);
	                    var index = layer.open({
	                        type: 2,
	                        area: [w+'px', h +'px'],
	                        fix: true,
	                        maxmin: false,
	                        shadeClose: true,
	                        shade:0.4,
	                        title: "修改",
	                        content: '/web/kefu/tpGaugeMaintenance/toEdit?id=' + datas[0].id
	                    });
	                }
	                break;
	            }
				case 'event-to-delete':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var _list = [];
						for(var i=0;i<datas.length;i++){
							_list[i]=datas[i].id;
						}
						
						layer.confirm('确定要删除吗？', {icon: 3}, function () {
							layer.msg('处理中', {
								icon: 16,shade: 0.01
							});
							$.ajax({
								url: '/api/kefu/tpGaugeMaintenance/deleteTrue',
								data: "list="+_list,
								type: 'POST',
								async: true,
								success: function (res) {
									layer.close();
									location.reload();
									layer.msg(res.msg);
								},
								error: function () {
									layer.close();
									layer.msg("删除失败，请稍后再试！", {icon: 2});
								}
							});
								
						}, function () {});
						
					}
					break;
				}
				case 'event-to-import'://主表信息导入
				{
					t.openImport(76); // 导入的菜单ID
					break;
				}
			};
	    },
	    listenMenu81: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-refresh':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "请选择需要刷新的店铺/日期",
						content: '/web/finance/tcwFinancesEventGroups/toAdd'
					});
					break;
				}
				case 'event-to-import'://主表信息导入
				{
					t.openImport(81); // 导入的菜单ID
					break;
				}
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwFinancesEventGroups/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
	    },
	    listenMenu82: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-export':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "导出表格",
						content: '/web/business/tpYsbExportLog/toExport?menuId=82'
					});
					break;
				}
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwFinancesApiInFo/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
	    },
	    listenMenu85: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					 var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "新增",
						content: '/web/mall/tmGoods/toAdd'
					});
					break;
				}
				case 'event-to-edit':
	            {
	                if(datas.length == 0) {
	                    layer.alert('尚未选中数据');
	                } else if(datas.length > 1) {
	                    layer.alert('只能选中一行数据');
	                } else {
	                    var w=($(window).width()*0.9);
	                    var h=($(window).height() - 50);
	                    var index = layer.open({
	                        type: 2,
	                        area: [w+'px', h +'px'],
	                        fix: true,
	                        maxmin: false,
	                        shadeClose: true,
	                        shade:0.4,
	                        title: "修改",
	                        content: '/web/mall/tmGoods/toEdit?id=' + datas[0].id
	                    });
	                }
	                break;
	            }
				case 'event-to-resort':
	            {
					layer.open({
						type: 2,
						title: "重新顺序",
						area: ['50%', '90%'],
						content: '/web/mall/tmGoods/toResort'
					});
	                break;
	            }
			};
	    },
	    listenMenu100: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-flow':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w=($(window).width()*0.9);
						var h=($(window).height() - 50);
					    var index = layer.open({
					        type: 2,
					        area: [w+'px', h +'px'],
					        fix: true,
					        maxmin: false,
					        shadeClose: true,
					        shade:0.4,
					        title: "编辑",
					        content: '/web/mall/tmGiftGiven/toFlow?bid=' + datas[0].bid
					    });
					}
					break;
				}
				case 'event-to-delete':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var row = datas[0];
						layui.layer.confirm("删除后不可恢复，确定彻底删除？",{
							btn: ['确定', '取消']
						}, function (index) {
							$.ajax({
								type: "POST",
								url: '/api/inter/tmGiftGiven/delete',
								data: {id: row.id},
								success: function (data) {
									if (data.code == 0) {
										reloadTableOfList();
									} else {
										alert(data.msg);
									}
								}
							});
							layer.close(index);
						});
					}
					break;
				}
				case 'event-to-flow-history':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var row = datas[0];
			        	var w=($(window).width()*0.9);
			        	var h=($(window).height() - 50);
			            layer.open({
			                type: 2,
			                area: [w+'px', h +'px'],
			                fix: true,
			                maxmin: false,
			                shadeClose: true,
			                shade:0.4,
			                title: "流程跟踪",
			                content: '/web/flow/ysp/toAudit?bid=' + row.bid
			            });
					}
					break;
				}
			};
	    },
	    listenMenu102: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-flow':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w=($(window).width()*0.9);
						var h=($(window).height() - 50);
					    var index = layer.open({
					        type: 2,
					        area: [w+'px', h +'px'],
					        fix: true,
					        maxmin: false,
					        shadeClose: true,
					        shade:0.4,
					        title: "编辑",
					        content: '/web/mall/tmGiftUse/toFlow?bid=' + datas[0].bid
					    });
					}
					break;
				}
				case 'event-to-delete':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var row = datas[0];
						layui.layer.confirm("删除后不可恢复，确定彻底删除？",{
							btn: ['确定', '取消']
						}, function (index) {
							$.ajax({
								type: "POST",
								url: '/api/inter/tmGiftUse/delete',
								data: {id: row.id},
								success: function (data) {
									if (data.code == 0) {
										reloadTableOfList();
									} else {
										alert(data.msg);
									}
								}
							});
							layer.close(index);
						});
					}
					break;
				}
				case 'event-to-flow-history':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var row = datas[0];
			        	var w=($(window).width()*0.9);
			        	var h=($(window).height() - 50);
			            layer.open({
			                type: 2,
			                area: [w+'px', h +'px'],
			                fix: true,
			                maxmin: false,
			                shadeClose: true,
			                shade:0.4,
			                title: "流程跟踪",
			                content: '/web/flow/ysp/toAudit?bid=' + row.bid
			            });
					}
					break;
				}
			};
	    },
	    listenMenu108: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-add': { 
					var w=($(window).width()*0.9); 
					var h=($(window).height() - 50); 
					var index = layer.open({ 
					type: 2, area: [w+'px', h +'px'], fix: true, maxmin: false, shadeClose: true, shade:0.4, title: "新增", 
					content: '/web/finance/tbPointRunningItem/toAdd'
					}); 
					break; 
				}
				case 'event-to-edit':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w=($(window).width()*0.9);
						var h=($(window).height() - 50);
						var index = layer.open({
							type: 2,
							area: [w+'px', h +'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade:0.4,
							title: "编辑",
							content: '/web/finance/tbPointRunningItem/toEdit?id=' + datas[0].id
					   });
					}
					break;
				}
				case 'event-to-delete':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var row = datas[0];
						layui.layer.confirm("删除后不可恢复，确定彻底删除？",{
							btn: ['确定', '取消']
						}, function (index) {
							$.ajax({
								type: "POST",
								url: '/api/inter/ysDict/delete',
								data: {id: row.id},
								success: function (data) {
									if (data.code == 0) {
										reloadTableOfList();
									} else {
										alert(data.msg);
									}
								}
							});
							layer.close(index);
						});
					}
					break;
				}
			};
	    },
	    listenMenu109: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					 var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "新增",
						content: '/web/finance/tcwPointTransfer/toAdd'
					});
					break;
				}
				case 'event-to-flow':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w=($(window).width()*0.9);
						var h=($(window).height() - 50);
					    var index = layer.open({
					        type: 2,
					        area: [w+'px', h +'px'],
					        fix: true,
					        maxmin: false,
					        shadeClose: true,
					        shade:0.4,
					        title: "审批",
					        content: '/web/finance/tcwPointTransfer/toFlow?bid=' + datas[0].bid
					    });
					}
					break;
				}
				case 'event-to-delete':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var row = datas[0];
						layui.layer.confirm("删除后不可恢复，确定彻底删除？",{
							btn: ['确定', '取消']
						}, function (index) {
							$.ajax({
								type: "POST",
								url: '/api/inter/tcwPointTransfer/delete',
								data: {id: row.id},
								success: function (data) {
									if (data.code == 0) {
										reloadTableOfList();
									} else {
										alert(data.msg);
									}
								}
							});
							layer.close(index);
						});
					}
					break;
				}
				case 'event-to-flow-history':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var row = datas[0];
			        	var w=($(window).width()*0.9);
			        	var h=($(window).height() - 50);
			            layer.open({
			                type: 2,
			                area: [w+'px', h +'px'],
			                fix: true,
			                maxmin: false,
			                shadeClose: true,
			                shade:0.4,
			                title: "流程跟踪",
			                content: '/web/flow/ysp/toAudit?bid=' + row.pbid
			            });
					}
					break;
				}
			};
	    },
	    listenMenu119: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					
					window.matchValuesAfterModalSelectRadio = function(colCode, data, extraData) {
						console.log('data =',data);
						var chooseId = data.id;
						/*
						for( var i=0;i<data.length;i++ ){
							_list[i]=data[i].id;
						}
						 */
						layui.layer.msg('处理中', {
							icon: 16,
							shade: 0.01
						});
						$.ajax({
							url: '/api/inter/tpShopStopPhaseRecord/add',
							data: {chooseId:chooseId},
							type: 'POST',
							async: false,
							success: function (result) {
								if(result.code=='0'){
									layer.close();
									//刷新列表
									setTimeout(function(){
										location.reload();
									}, 1000);
									//return;
								}else {//失败
									layer.close();
									layer.msg(result.msg, {icon: 2});
								}
							},
							error: function () {
								layer.close();
								layer.msg("新增失败，请稍后再试！", {icon: 2});
							}
						});
					};
					layui.YsModal.init({modalKey: 'THR_OperateCompanyApply_NO_ShopStopPhaseRecord', colCode: 'aaaa', parentObj: window});
					//layui.YsModal.init({modalKey: 'THR_OperateCompanyApply_NO_ShopStopPhaseRecord', type: 'checkbox', uniqueKey: 'id',parentObj: window,selectedData: []});
					break;
				}
				case 'event-to-chooseShop':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w=($(window).width()*0.9);
						var h=($(window).height() - 50);
						var index = layer.open({
							type: 2,
							area: [w+'px', h +'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade:0.4,
							title: "选择店铺",
							content: '/web/business/tpShopStopPhaseRecord/toChooseShop?id=' + datas[0].id + '&phaseNum=' + datas[0].phaseNum+ '&vGsBm=' + datas[0].vGsBm
						});
					}
					break;
				}
				case 'event-to-finish':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var _list = [];
						for(var i=0;i<datas.length;i++){
							if(datas[i].workTime==undefined || datas[i].workTime==null || datas[i].workTime==''){
								_list.push(datas[i].id);
							}
						}
						var finishMsg = '确定要完成选中的跟踪单吗？';
						if(_list==null || _list.length == 0 || _list.length == []){
							finishMsg = '选中的跟踪单已完成，请重新选择！';
							layer.msg(finishMsg, {icon: 0});
							return;
						}
						if(_list!=null && _list.length < datas.length){
							finishMsg = '您选中的跟踪单有部分已完成，完成时将不会更改这些信息，是否继续？';
						}
						layer.confirm(finishMsg, {icon: 3}, function () {
							layer.msg('处理中', {
								icon: 16,shade: 0.01
							});
							var ids = '';
							for(var i=0;i<_list.length;i++){
								if(i==0){
									ids = _list[i];
								}else {
									ids = ids + ',' +_list[i];
								}
							}
							$.ajax({
								url: '/api/inter/tpShopStopPhaseRecord/finishRecord',
								data: {ids: ids},
								type: 'POST',
								async: true,
								success: function (res) {
									layer.close();
									layer.msg(res.msg);
									if(res.code==0){
										setTimeout(function(){location.reload();}, 2000);
									}
								},
								error: function () {
									layer.close();
									layer.msg("处理失败，请稍后再试！", {icon: 2});
								}
							});
	
						}, function () {});
	
					}
					break;
				}
				case 'event-to-delete':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var _list = [];
						for(var i=0;i<datas.length;i++){
							_list[i]=datas[i].operateCompanyId;
						}
	
						layer.confirm('确定要删除选中的跟踪单吗？', {icon: 3}, function () {
							layer.msg('处理中', {
								icon: 16,shade: 0.01
							});
							var ids = '';
							for(var i=0;i<_list.length;i++){
								if(i==0){
									ids = _list[i];
								}else {
									ids = ids + ',' +_list[i];
								}
							}
							$.ajax({
								url: '/api/inter/tpShopStopPhaseRecord/deleteTrue',
								data: {ids: ids},
								type: 'POST',
								async: true,
								success: function (res) {
									layer.close();
									location.reload();
									layer.msg(res.msg);
								},
								error: function () {
									layer.close();
									layer.msg("删除失败，请稍后再试！", {icon: 2});
								}
							});
	
						}, function () {});
	
					}
					break;
				}
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tpShopStopPhaseRecord/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
	    },
	    listenMenu120: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "新增",
						content: '/web/business/tpShopStopPhaseSet/toAdd'
					});
					break;
				}
			};
	    },
	    listenMenu122: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-edit':
	            {
	                if(datas.length == 0) {
	                    layer.alert('尚未选中数据');
	                } else if(datas.length > 1) {
	                    layer.alert('只能选中一行数据');
	                } else {
	                    var w=($(window).width()*0.9);
	                    var h=($(window).height() - 50);
	                    var index = layer.open({
	                        type: 2,
	                        area: [w+'px', h +'px'],
	                        fix: true,
	                        maxmin: false,
	                        shadeClose: true,
	                        shade:0.4,
	                        title: "修改",
	                        content: '/web/sys/tbStaticConfig/toEdit?id=' + datas[0].id
	                    });
	                }
	                break;
	            }
			};
	    },
	    listenMenu123: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					//window.top.add_tab('商品类目维护 - 新增', '/web/business/tbBaseinfoDwmc/toAdd')
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "新增",
						content: '/web/business/tbBaseinfoDwmc/toAdd'
					});
					break;
				}
				case 'event-to-edit':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w=($(window).width()*0.9);
						var h=($(window).height() - 50);
						var index = layer.open({
							type: 2,
							area: [w+'px', h +'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade:0.4,
							title: "修改",
							content: '/web/business/tbBaseinfoDwmc/toEdit?id=' + datas[0].id
						});
					}
					break;
				}
				case 'event-to-delete':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					}else {
						console.log(datas[0])
						layer.confirm('确定要删除吗？', {icon: 3}, function () {
							layer.msg('处理中', {
								icon: 16,shade: 0.01
							});

							$.ajax({
								url: '/api/inter/tbBaseinfoDwmc/deleteTrue',
								data: {'id':datas[0].id},
								type: 'POST',
								async: true,
								success: function (res) {
									layer.close();
									location.reload();
									layer.msg(res.msg);
								},
								error: function () {
									layer.close();
									layer.msg("删除失败，请稍后再试！", {icon: 2});
								}
							});

						}, function () {});

					}
					break;
				}
			};
	    },
	    listenMenu124: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					//window.top.add_tab('商品用途维护 - 新增', '/web/business/tbBaseinfoSpyt/toAdd')
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "新增",
						content: '/web/business/tbBaseinfoSpyt/toAdd'
					});
					break;
				}
				case 'event-to-edit':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w=($(window).width()*0.9);
						var h=($(window).height() - 50);
						var index = layer.open({
							type: 2,
							area: [w+'px', h +'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade:0.4,
							title: "修改",
							content: '/web/business/tbBaseinfoSpyt/toEdit?id=' + datas[0].id
						});
					}
					break;
				}
				case 'event-to-delete':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					}else {
						console.log(datas[0])
						layer.confirm('确定要删除吗？', {icon: 3}, function () {
							layer.msg('处理中', {
								icon: 16,shade: 0.01
							});

							$.ajax({
								url: '/api/inter/tbBaseinfoSpyt/deleteTrue',
								data: {'id':datas[0].id},
								type: 'POST',
								async: true,
								success: function (res) {
									layer.close();
									location.reload();
									layer.msg(res.msg);
								},
								error: function () {
									layer.close();
									layer.msg("删除失败，请稍后再试！", {icon: 2});
								}
							});

						}, function () {});

					}
					break;
				}
			};
	    },
	    listenMenu125: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					//window.top.add_tab('商品类目维护 - 新增', '/web/business/tbBaseinfoLmwh/toAdd')
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "新增",
						content: '/web/business/tbBaseinfoLmwh/toAdd'
					});
					break;
				}
				case 'event-to-edit':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w=($(window).width()*0.9);
						var h=($(window).height() - 50);
						var index = layer.open({
							type: 2,
							area: [w+'px', h +'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade:0.4,
							title: "修改",
							content: '/web/business/tbBaseinfoLmwh/toEdit?id=' + datas[0].id
						});
					}
					break;
				}
				case 'event-to-delete':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var _list = [];
						for(var i=0;i<datas.length;i++){
							_list[i]=datas[i].id;
						}
	
						layer.confirm('确定要删除吗？', {icon: 3}, function () {
							layer.msg('处理中', {
								icon: 16,shade: 0.01
							});
							$.ajax({
								url: '/api/inter/tbBaseinfoLmwh/deleteTrue',
								data: "list="+_list,
								type: 'POST',
								async: true,
								success: function (res) {
									layer.close();
									location.reload();
									layer.msg(res.msg);
								},
								error: function () {
									layer.close();
									layer.msg("删除失败，请稍后再试！", {icon: 2});
								}
							});
	
						}, function () {});
	
					}
					break;
				}
			};
	    },
	    listenMenu126: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					//window.top.add_tab('商品品类维护 - 新增', '/web/business/tbBaseinfoSppl/toAdd')
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "新增",
						content: '/web/business/tbBaseinfoSppl/toAdd'
					});
					break;
				}
				case 'event-to-edit':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w=($(window).width()*0.9);
						var h=($(window).height() - 50);
						var index = layer.open({
							type: 2,
							area: [w+'px', h +'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade:0.4,
							title: "修改",
							content: '/web/business/tbBaseinfoSppl/toEdit?id=' + datas[0].id
						});
					}
					break;
				}
				case 'event-to-delete':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					}else {
						console.log(datas[0])
						layer.confirm('确定要删除吗？', {icon: 3}, function () {
							layer.msg('处理中', {
								icon: 16,shade: 0.01
							});

							$.ajax({
								url: '/api/inter/tbBaseinfoSppl/deleteTrue',
								data: {'id':datas[0].id},
								type: 'POST',
								async: true,
								success: function (res) {
									layer.close();
									location.reload();
									layer.msg(res.msg);
								},
								error: function () {
									layer.close();
									layer.msg("删除失败，请稍后再试！", {icon: 2});
								}
							});

						}, function () {});

					}
					break;
				}
			};
	    },
	    listenMenu127: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					//window.top.add_tab('商品品名维护 - 新增', '/web/business/tbBaseinfoSppm/toAdd')
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "新增",
						content: '/web/business/tbBaseinfoSppm/toAdd'
					});
					break;
				}
				case 'event-to-edit':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w=($(window).width()*0.9);
						var h=($(window).height() - 50);
						var index = layer.open({
							type: 2,
							area: [w+'px', h +'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade:0.4,
							title: "修改",
							content: '/web/business/tbBaseinfoSppm/toEdit?id=' + datas[0].id
						});
					}
					break;
				}
				case 'event-to-delete':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					}else {
						console.log(datas[0])
						layer.confirm('确定要删除吗？', {icon: 3}, function () {
							layer.msg('处理中', {
								icon: 16,shade: 0.01
							});

							$.ajax({
								url: '/api/inter/tbBaseinfoSppm/deleteTrue',
								data: {'id':datas[0].id},
								type: 'POST',
								async: true,
								success: function (res) {
									layer.close();
									location.reload();
									layer.msg(res.msg);
								},
								error: function () {
									layer.close();
									layer.msg("删除失败，请稍后再试！", {icon: 2});
								}
							});

						}, function () {});

					}
					break;
				}
			};
	    },
	    listenMenu128: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					//window.top.add_tab('商品品名维护 - 新增', '/web/business/tbBaseinfoSpcz/toAdd')
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "新增",
						content: '/web/business/tbBaseinfoSpcz/toAdd'
					});
					break;
				}
				case 'event-to-edit':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w=($(window).width()*0.9);
						var h=($(window).height() - 50);
						var index = layer.open({
							type: 2,
							area: [w+'px', h +'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade:0.4,
							title: "修改",
							content: '/web/business/tbBaseinfoSpcz/toEdit?id=' + datas[0].id
						});
					}
					break;
				}
				case 'event-to-delete':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					}else {
						console.log(datas[0])
						layer.confirm('确定要删除吗？', {icon: 3}, function () {
							layer.msg('处理中', {
								icon: 16,shade: 0.01
							});

							$.ajax({
								url: '/api/inter/tbBaseinfoSpcz/deleteTrue',
								data: {'id':datas[0].id},
								type: 'POST',
								async: true,
								success: function (res) {
									layer.close();
									location.reload();
									layer.msg(res.msg);
								},
								error: function () {
									layer.close();
									layer.msg("删除失败，请稍后再试！", {icon: 2});
								}
							});

						}, function () {});

					}
					break;
				}
			};
	    },
	    listenMenu136: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				//上传至知识库
				case 'event-to-addToLedge':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
						return;
					}
					var ids = '';
					for(var i=0;i<datas.length;i++){
						if(ids==''){
							ids = datas[i].id;
						}else {
							ids = ids+','+datas[i].id;
						}
					}
					layer.open({
						title: '选择要上传的知识库分类',
						type: 2,
						area: [$(window).width()*0.8+'px', ($(window).height() - 50)+'px'],
						content: '/web/eKnowAi/webEKnowAiController/chatLogManageUpload?id='+ids,
						fixed: false, // 不固定
						maxmin: true,
						btnAlign: 'c',
					});
					break;
				}
				case 'event-to-del':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var ids = '';
						for(var i=0;i<datas.length;i++){
							if(ids==''){
								ids = datas[i].id;
							}else {
								ids = ids+','+datas[i].id;
							}
						}

						layer.confirm('确定要删除选中的日志吗？', {icon: 3}, function () {
							layer.msg('处理中', {
								icon: 16,shade: 0.01
							});
							$.ajax({
								url: '/api/inter/eKnowChatLogManage/delChatLogManageByBatch',
								data: {ids: ids},
								type: 'POST',
								async: true,
								success: function (res) {
									layer.close();
									location.reload();
									layer.msg(res.msg);
								},
								error: function () {
									layer.close();
									layer.msg("删除失败，请稍后再试！", {icon: 2});
								}
							});

						}, function () {});

					}
					break;
				}
			};
	    },
	    listenMenu140: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "新增运营公司备案",
						content: '/web/hr/thrOperateCompanyApply/toAdd'
					});
					break;
				}
				case 'event-to-edit':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w=($(window).width()*0.9);
						var h=($(window).height() - 50);
						var index = layer.open({
							type: 2,
							area: [w+'px', h +'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade:0.4,
							title: "编辑",
							content: '/web/hr/thrOperateCompanyApply/toEdit?id=' + datas[0].id
						});
					}
					break;
				}
			};
	    },
	    listenMenu141: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "新增运营公司备案",
						content: '/web/hr/thrOperateCompanyApply/toAdd'
					});
					break;
				}
				case 'event-to-edit':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w=($(window).width()*0.9);
						var h=($(window).height() - 50);
						var index = layer.open({
							type: 2,
							area: [w+'px', h +'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade:0.4,
							title: "编辑",
							content: '/web/hr/thrOperateCompanyApply/toEdit?id=' + datas[0].id
						});
					}
					break;
				}
			};
	    },
	    listenMenu10142: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-addToManage':
				{
                    if(datas.length == 0) {
                        layer.alert('尚未选中数据');
                        return;
                    }
                    var loadIndex = layer.confirm('确定要将所选择的日志添加至管理?', {icon: 3}, function () {
                        //点击确定的回调
                        layer.close(loadIndex);
                        layer.load(2);
						var ids = '';
						for(var i=0;i<datas.length;i++){
							if(ids==''){
								ids = datas[i].id;
							}else {
								ids = ids+','+datas[i].id;
							}
						}
                        $.ajax({
                            url: '/api/inter/eKnowChatLog/chatLogAddManage',
                            data: {ids: ids},
                            type: 'POST',
                            async: true,
                            timeout: 60000,
                            success: function (result) {
                                if(result.code=='SUCCESS'){
                                    layer.closeAll();
                                    layer.msg("操作成功", {icon: 1});
                                    location.reload();
                                }else {//失败
                                    layer.closeAll();
                                    layer.msg("操作失败，请稍后再试！", {icon: 2});
                                }
                            },
                            error: function () {
                                layer.closeAll();
                                layer.msg("操作失败，请稍后再试！", {icon: 2});
                            }
                        });
                    }, function () {return false;});//点击取消的回调
					break;
				}
			};
	    },
	    listenMenu10151: function(obj, datas) {
			switch(obj.event){
				case 'event-to-add':
				{
					layer.open({
						title: '新增',
						type: 2,
						area: [$(window).width()*0.8+'px', ($(window).height() - 50)+'px'],
						content: '/web/eKnowAi/webEKnowAiController/sceneAdd',
						fixed: false, // 不固定
						maxmin: true,
						btnAlign: 'c',
					});
					break;
				}
				case 'event-to-edit'://编辑
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var index = layer.open({
							type: 2,
							area: [$(window).width()*0.8+'px', ($(window).height() - 50)+'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade:0.4,
							title: "编辑",
							content: '/web/eKnowAi/webEKnowAiController/sceneUpdate?id=' + datas[0].id
						});
					}
					break;
				}
				case 'event-to-del':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var row = datas[0];
						layui.layer.confirm("删除后不可恢复，确定彻底删除？",{
							btn: ['确定', '取消']
						}, function (index) {
							var layindex= layer.load(2);
							$.ajax({
								type: "POST",
								url: '/api/inter/eKnowScene/delEKnowScene',
								data: {id: row.id},
								success: function (data) {
									layer.close(layindex);
									if (data.code=='SUCCESS') {
										layer.msg("操作成功", {icon: 1});
										setTimeout(function(){
											window.parent.location.reload();
										}, 1000);
									} else {
										alert("不好意思，系统出现问题了，请稍后重试！");
									}
								}
							});
							layer.close(index);
						});
					}
					break;
				}
			};
	    },
	    listenMenu10156: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					 var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "新增",
						content: '/web/mall/tmCate/toAdd'
					});
					break;
				}
				case 'event-to-edit':
	            {
	                if(datas.length == 0) {
	                    layer.alert('尚未选中数据');
	                } else if(datas.length > 1) {
	                    layer.alert('只能选中一行数据');
	                } else {
	                    var w=($(window).width()*0.9);
	                    var h=($(window).height() - 50);
	                    var index = layer.open({
	                        type: 2,
	                        area: [w+'px', h +'px'],
	                        fix: true,
	                        maxmin: false,
	                        shadeClose: true,
	                        shade:0.4,
	                        title: "修改",
	                        content: '/web/mall/tmCate/toEdit?id=' + datas[0].id
	                    });
	                }
	                break;
	            }
				case 'event-to-resort':
	            {
					layer.open({
						type: 2,
						title: "重新顺序",
						area: ['50%', '90%'],
						content: '/web/mall/tmCate/toResort'
					});
	                break;
	            }
			};
	    },
	    listenMenu10160: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					//window.top.add_tab('商品库 - 新增', '/web/business/tpProductBasis/toAdd')
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
				    var index = layer.open({
				        type: 2,
				        area: [w+'px', h +'px'],
				        fix: true,
				        maxmin: false,
				        shadeClose: true,
				        shade:0.4,
				        title: "新增",
				        content: '/web/finance/tcwPointRewardPunish/toAdd'
				    });
					break;
				}
				case 'event-to-flow':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w=($(window).width()*0.9);
						var h=($(window).height() - 50);
					    var index = layer.open({
					        type: 2,
					        area: [w+'px', h +'px'],
					        fix: true,
					        maxmin: false,
					        shadeClose: true,
					        shade:0.4,
					        title: "审批",
					        content: '/web/finance/tcwPointRewardPunish/toFlow?bid=' + datas[0].bid
					    });
					}
					break;
				}
			};
	    },
	    listenMenu10163: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-setting':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
				    var index = layer.open({
				        type: 2,
				        area: [w+'px', h +'px'],
				        fix: true,
				        maxmin: false,
				        shadeClose: true,
				        shade:0.4,
				        title: "设置",
				        content: '/web/business/tpBoutiqueDiscount/toSetting'
				    });
					break;
				}
			};
	    },
	    listenMenu10165: function(obj, datas) {
			switch(obj.event){
				case 'event-to-add':
				{
					//window.top.add_tab("印章管理 - 新增","/web/administration/webAdmSignetManageController/toAdd");
					var w=($(window).width()*0.7);
					var h=($(window).height() - 150);
					var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "印章管理 - 新增",
						content: '/web/administration/webAdmSignetManageController/toAdd'
					});
					break;
				}
				case 'event-to-edit':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						//window.top.add_tab("印章管理("+datas[0].code+")","/web/administration/webAdmSignetManageController/toEdit?id="+datas[0].id);
						var w=($(window).width()*0.7);
						var h=($(window).height() - 150);
						var index = layer.open({
							type: 2,
							area: [w+'px', h +'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade:0.4,
							title: "印章管理("+datas[0].code+")",
							content: '/web/administration/webAdmSignetManageController/toEdit?id='+datas[0].id
						});
					}
					break;
				}
			};
	    },
	    listenMenu10166: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl("印章申请 - 新增","/web/administration/webAdmUseSignetApplyController/toAdd",1);
					//window.top.add_tab("印章申请 - 新增","/web/administration/webAdmUseSignetApplyController/toAdd");
					break;
				}
				case 'event-to-edit':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl("印章申请("+datas[0].bid+")","/web/administration/webAdmUseSignetApplyController/toEdit?bid="+datas[0].bid,1);
						//window.top.add_tab("印章申请("+datas[0].bid+")","/web/administration/webAdmUseSignetApplyController/toEdit?id="+datas[0].id);
					}
					break;
				}
			};
	    },
		listenMenu10167: function(obj, datas) {// 平台维护
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "新增",
						content: '/web/base/tbSite/toAdd'
					});
					break;
				}
				case 'event-to-edit'://编辑
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w=($(window).width()*0.9);
						var h=($(window).height() - 50);
						var index = layer.open({
							type: 2,
							area: [w+'px', h +'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade:0.4,
							title: "编辑",
							content: '/web/base/tbSite/toEdit?id=' + datas[0].id
						});
					}
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tbSite/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
	    listenMenu10168: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-edit':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl("精品库("+datas[0].code+")","/web/business/tpBoutique/toEdit?id="+datas[0].id+'&code='+datas[0].code,1);
						//window.top.add_tab("精品库("+datas[0].code+")","/web/business/tpBoutique/toEdit?id="+datas[0].id+'&code='+datas[0].code);
					}
					break;
				}
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tpBoutique/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-setting':
				{
					if (datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if (datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w = ($(window).width() * 0.9);
						var h = ($(window).height() - 50);
						var index = layer.open({
							type: 2, area: [w + 'px', h + 'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade: 0.4,
							title: "修改",
							content: '/web/business/tpBoutique/toSetting?code=' + datas[0].code
						});
					}
					break; 
				}
				case 'event-to-importDetail'://站点信息导入
				{
					t.openImport(10176); // 导入的菜单ID
                    break;
				}
				case 'event-to-import'://主表信息导入
				{
					t.openImport(10168); // 导入的菜单ID
					break;
				}
			};

	    },
	    listenMenu10169: function(obj, datas) {
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					layer.open({
						shadeClose:true,
						title: '选择商品属性',
						content: `
							<form class="layui-form">
							  <div class="layui-form-item">
								<select id="commodityProperty" lay-filter="aihao">
									<option value="新品" selected="">新品</option>
									<option value="优品" >优品</option>
									<option value="变体">变体</option>
									<option value="精品">精品</option>
								  </select>
							  </div>
							</form>
							`,
						success: function(layero, index) {
							layui.form.render();
							layero.find('.layui-layer-content').css('overflow', 'unset');
						},
						yes: function (index, layero) {
							$(obj).on('click', window.top.menuItem);
							t.openUrl("商品备案申请 - 新增","/web/business/tpProductBq/toAdd?commodityProperty="+$('#commodityProperty').val(),1);
							//window.top.add_tab("商品备案申请 - 新增","/web/business/tpProductBq/toAdd?commodityProperty="+$('#commodityProperty').val());
							layer.closeAll();
						}
					});
					break;
				}
				case 'event-to-edit':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl("商品备案申请("+datas[0].bid+")","/web/business/tpProductBq/toEdit?id="+datas[0].id+'&commodityProperty='+datas[0].commodityProperty,1);
						//window.top.add_tab("商品备案申请("+datas[0].bid+")","/web/business/tpProductBq/toEdit?id="+datas[0].id+'&commodityProperty='+datas[0].commodityProperty);
					}
					break;
				}
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tpProductBq/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-import'://主表信息导入
				{
					t.openImport(10183); // 导入的菜单ID
					break;
				}
				case 'event-to-importYp'://批量导入优品
				{
					t.openImport(10169); // 导入的菜单ID
					break;
				}
			};
	    },
	    listenMenu10171: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					//window.top.add_tab('商品库 - 新增', '/web/business/tpProductBasis/toAdd')
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
				    var index = layer.open({
				        type: 2,
				        area: [w+'px', h +'px'],
				        fix: true,
				        maxmin: false,
				        shadeClose: true,
				        shade:0.4,
				        title: "新增",
				        content: '/web/sys/tsOperateOrg/toAdd'
				    });
					break;
				}
				case 'event-to-edit':
	            {
	                if(datas.length == 0) {
	                    layer.alert('尚未选中数据');
	                } else if(datas.length > 1) {
	                    layer.alert('只能选中一行数据');
	                } else {
						//window.top.add_tab('运营机构管理 - 编辑', '/web/sys/tsOperateOrg/toEdit?id=' + datas[0].id)
						t.openUrl('运营机构管理 - 编辑', '/web/sys/tsOperateOrg/toEdit?id=' + datas[0].id,1);
	                }
	                break;
	            }
			};
	    },
		listenMenu10180: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					//window.top.add_tab("A+申请 - 新增","/web/business/tpAplusSq/toAdd");
					t.openUrl("A+申请 - 新增","/web/business/tpAplusSq/toAdd",1);
					break;
				}
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tpAplusSq/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
	    },
		listenMenu10182: function(obj, datas) {
			var t = this;
			switch(obj.event){
				case 'event-to-edit':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w=($(window).width()*0.9);
						var h=($(window).height() - 50);
						var index = layer.open({
							type: 2,
							area: [w+'px', h +'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade:0.4,
							title: "修改",
							content: '/web/sys/tsOrganizationInfo/toEdit?id=' + datas[0].id
						});
					}
					break;
				}
			}
		},
		listenMenu10184: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-detail'://详情
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						//window.top.add_tab('Listing库('+datas[0].code+') - 详情', '/web/business/tpProductActive/toEdit?id=' + datas[0].id+"&editType=detail")
						t.openUrl('Listing库('+datas[0].code+') - 详情','/web/business/tpProductActive/toEdit?id=' + datas[0].id+"&editType=detail",1);
					}
					break;
				}
				case 'event-to-operationsEdit'://运营维护
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl('Listing库('+datas[0].code+') - 运营维护', '/web/business/tpProductActive/toEdit?id=' + datas[0].id+"&editType=operations",1);
						//window.top.add_tab('Listing库('+datas[0].code+') - 运营维护', '/web/business/tpProductActive/toEdit?id=' + datas[0].id+"&editType=operations")
					}
					break;
				}
				case 'event-to-storageEdit'://仓储维护
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl('Listing库('+datas[0].code+') - 仓储维护', '/web/business/tpProductActive/toEdit?id=' + datas[0].id+"&editType=storage",1);
						//window.top.add_tab('Listing库('+datas[0].code+') - 仓储维护', '/web/business/tpProductActive/toEdit?id=' + datas[0].id+"&editType=storage")
					}
					break;
				}
				case 'event-to-logisticsEdit'://物流维护
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl('Listing库('+datas[0].code+') - 物流维护', '/web/business/tpProductActive/toEdit?id=' + datas[0].id+"&editType=logistics",1);
						//window.top.add_tab('Listing库('+datas[0].code+') - 物流维护', '/web/business/tpProductActive/toEdit?id=' + datas[0].id+"&editType=logistics")
					}
					break;
				}
				case 'event-to-purchaseEdit'://采购维护
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl('Listing库('+datas[0].code+') - 采购维护', '/web/business/tpProductActive/toEdit?id=' + datas[0].id+"&editType=purchase",1);
						//('Listing库('+datas[0].code+') - 采购维护', '/web/business/tpProductActive/toEdit?id=' + datas[0].id+"&editType=purchase")
					}
					break;
				}
				case 'event-to-manageEdit'://管理维护
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
	
						t.openUrl('Listing库('+datas[0].code+') - 管理维护', '/web/business/tpProductActive/toEdit?id=' + datas[0].id+"&editType=manage",1);
						//window.top.add_tab('Listing库('+datas[0].code+') - 管理维护', '/web/business/tpProductActive/toEdit?id=' + datas[0].id+"&editType=manage")
					}
					break;
				}
				case 'event-to-updateVgsbm'://批量修改运营公司编码
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var codeList = [];
						for(var i=0;i<datas.length;i++){
							codeList.push(datas[i].code);
						}
						var codes = '';
						for(var i=0;i<codeList.length;i++){
							if(codes==''){
								codes = codeList[i];
							}else {
								codes = codes+','+codeList[i];
							}
						}
						window.matchValuesAfterModalSelectRadio = function(colCode, data, extraData) {
							console.log('data =',data);
							//var _list = [data.vGsBm];
							layui.layer.msg('处理中', {
								icon: 16,
								shade: 0.01
							});
							$.ajax({
								type: "POST",
								url: '/api/inter/tpProductActive/updateVgsbm',
								data: {codeList: codes,vgsbm:data.vgsbm},
								success: function (data) {
									if (data.code == 0) {
										layer.msg('修改成功！');
									} else {
										layer.msg(data.msg);
									}
									setTimeout(function(){
										layer.closeAll();
										location.reload();
									}, 3000);
								}
							});
						};
						layui.YsModal.init({modalKey: 'THR_OperateCompanyApply', colCode: 'aaaa', parentObj: window});
						break;
					}
					break;
				}
				case 'event-to-export'://导出
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "导出表格",
						content: '/web/business/tpYsbExportLog/toExport?menuId=10184'
					});
					break;
				}
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tpProductActive/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-printGoods': // 打印商品标
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						$.ajax({
							type: "POST",
							url: '/api/inter/tpProductActive/generateGoodsPDF',
							data: {id: datas[0].id},
							success: function (data) {
								if (data.code == 0) {
									if(data.msg != undefined && data.msg.startsWith('http')) {
										window.open(data.msg);
									} else {
										layer.msg(data.msg);
									}
								} else {
									alert(data.msg);
								}
							}
						});
					}
					break;
				}

				case 'event-to-copyGoods': // 商品复制
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var codeList = [];
						for(var i=0;i<datas.length;i++){
							codeList.push(datas[i].code);
						}
						var codes = '';
						for(var i=0;i<codeList.length;i++){
							if(codes==''){
								codes = codeList[i];
							}else {
								codes = codes+','+codeList[i];
							}
						}
						layui.layer.confirm("确定要复制所选的商品？",{
							btn: ['确定', '取消']
						}, function (index) {
							layui.layer.msg('处理中', {
								icon: 16,
								shade: 0.01
							});
							$.ajax({
								type: "POST",
								url: '/api/inter/tpProductActive/copyGoods',
								data: {codes: codes},
								success: function (data) {
									if (data.code == 0) {
										layer.msg('操作成功！');
                                        setTimeout(function(){
                                            layer.closeAll();
                                            location.reload();
                                        }, 3000);
									} else {
										layer.msg(data.msg);
									}
								}
							});
						});
					}
					break;
				}
			};
		},
		listenMenu10192: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
				    var index = layer.open({
				        type: 2,
				        area: [w+'px', h +'px'],
				        fix: true,
				        maxmin: false,
				        shadeClose: true,
				        shade:0.4,
				        title: "新增",
				        content: '/web/sys/ysGrid/toAdd'
				    });
					break;
				}
			};
		},
		listenMenu10178: function(obj, datas) {
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					//window.top.add_tab("Listing申请 - 新增","/web/business/tpProductActiveSq/toAdd");
					t.openUrl("Listing申请 - 新增","/web/business/tpProductActiveSq/toAdd",1);
					break;
				}
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tpProductActiveSq/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-edit':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w=($(window).width()*0.9);
						var h=($(window).height() - 50);
						var index = layer.open({
							type: 2,
							area: [w+'px', h +'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade:0.4,
							title: "修改",
							content: '/web/business/tpProductActiveSq/toEdit?id=' + datas[0].id
						});
					}
					break;
				}
				case 'event-to-flow':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w=($(window).width()*0.9);
						var h=($(window).height() - 50);
						var index = layer.open({
							type: 2,
							area: [w+'px', h +'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade:0.4,
							title: "编辑",
							content: '/web/business/tpProductActiveSq/toFlow?bid=' + datas[0].bid
						});
					}
					break;
				}
				case 'event-to-flow-history':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var row = datas[0];
						var w=($(window).width()*0.9);
						var h=($(window).height() - 50);
						layer.open({
							type: 2,
							area: [w+'px', h +'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade:0.4,
							title: "流程跟踪",
							content: '/web/flow/ysp/toAudit?bid=' + row.pbid
						});
					}
					break;
				}
				case 'event-to-delete':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var _list = [];
						for(var i=0;i<datas.length;i++){
							_list[i]=datas[i].id;
						}

						layer.confirm('确定要删除吗？', {icon: 3}, function () {
							layer.msg('处理中', {
								icon: 16,shade: 0.01
							});
							$.ajax({
								url: '/api/inter/tpProductActiveSq/deleteTrue',
								data: "list="+_list,
								type: 'POST',
								async: true,
								success: function (res) {
									layer.close();
									location.reload();
									layer.msg(res.msg);
								},
								error: function () {
									layer.close();
									layer.msg("删除失败，请稍后再试！", {icon: 2});
								}
							});

						}, function () {});

					}
					break;
				}
			};
		},
	    listenMenu10195: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "新增图标",
						content: '/web/sys/ysIcon/toAdd'
				   });
					break;
				}
				case 'event-to-batch-import':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					 var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "新增",
						content: '/web/sys/ysIcon/toBatchImport'
					});
					break;
				}
			};
	    },
		listenMenu10199: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl('预约调拨单-新增',"/web/storage/tccAllocate/toAdd",1);
					break;
				}
				case 'event-to-flow':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var bid = datas[0].bid;
						t.openUrl('预约调拨单编辑-' + bid, '/web/storage/tccAllocate/toFlow?bid=' + bid, 1);
					}
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tccAllocate/export',

						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
		listenMenu10203: function(obj, datas) {
			var t = this;
			switch(obj.event){
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwFinancesEventGroupsOp/export',

						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-refresh':
				{
					t.openUrl('请选择需要刷新的店铺/日期',"/web/finance/tcwFinancesEventGroupsOp/toAdd",1);
					break;
				}
			};
		},


		listenMenu10201: function(obj, datas) {
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl("运营人员登记 - 新增","/web/hr/thrOperateRegistration/toAdd",1);
					break;
				}
				case 'event-to-edit'://编辑
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl('运营人员登记('+datas[0].userId+') - 编辑','/web/hr/thrOperateRegistration/toEdit?bid=' + datas[0].bid,1);
					}
					break;
				}
				case 'LAYTABLE_EXPORT_DATA'://导出
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/thrOperateRegistration/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}

			};
		},
		listenMenu10206: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl('手工分配单-新增',"/web/storage/tccDistribute/toAdd",1);
					break;
				}
				case 'event-to-flow':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var bid = datas[0].bid;
						t.openUrl('手工分配单编辑-' + bid, '/web/storage/tccDistribute/toFlow?bid=' + bid, 1);
					}
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tccDistribute/export',

						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
		listenMenu10207: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl('预约调拨取消单-新增',"/web/storage/tccAllocateCancel/toAdd",1);
					break;
				}
				case 'event-to-flow':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var bid = datas[0].bid;
						t.openUrl('预约调拨取消单编辑-' + bid, '/web/storage/tccAllocateCancel/toFlow?bid=' + bid, 1);
					}
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tccAllocateCancel/export',

						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
		listenMenu10205: function(obj, datas) {//员工入职申请
			var t = this;
			switch(obj.event){
				case 'event-to-add'://新增
				{
					t.openUrl('员工入职申请 - 新增','/web/hr/thrUserEntryApply/toAdd',1);
					break;
				}
				case 'event-to-edit'://编辑
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl('员工入职申请('+datas[0].userId+') - 编辑','/web/hr/thrUserEntryApply/toEdit?bid=' + datas[0].bid,1);
					}
					break;
				}
				case 'LAYTABLE_EXPORT_DATA'://导出
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/thrUserEntryApply/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},

		listenMenu10208: function(obj, datas) {//人员档案
			var t = this;
			switch(obj.event){
				case 'event-to-edit'://编辑
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl('人员档案('+datas[0].userId+') - 编辑','/web/hr/thrUserArchives/toEdit?id=' + datas[0].id,1);
					}
					break;
				}
				case 'LAYTABLE_EXPORT_DATA'://导出
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/thrUserArchives/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
		listenMenu10219: function(obj, datas) {// 邮件标签
			var t = this;
			switch(obj.event){
				case 'event-to-add'://新增
				{
					t.openUrl('邮件标签 - 新增','/web/mail/mailTag/toAdd',1);
					break;
				}
				case 'event-to-edit'://编辑
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl('邮件标签 - 编辑', '/web/mail/mailTag/toEdit?id=' + datas[0].id, 1);
					}
					break;
				}
			};
		},

		listenMenu10227: function(obj, datas) {//万里汇账户管理
			var t = this;
			switch(obj.event){
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/wfSubUser/export',

						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
		listenMenu10229: function(obj, datas) {//万里汇历史余额
			var t = this;
			switch(obj.event){
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/wfHistoricalBalance/export',

						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
		listenMenu10231: function(obj, datas) {//万里汇多账号管理
			var t = this;
			switch(obj.event){
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/wfStore/export',

						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
		listenMenu10235: function(obj, datas) {// 币种管理
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "新增",
						content: '/web/business/tpAmazonShopExchangeRate/toAdd'
					});
					break;
				}
				case 'event-to-update':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w = ($(window).width() * 0.9);
						var h = ($(window).height() - 50);
						var index = layer.open({
							type: 2,
							area: [w + 'px', h + 'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade: 0.4,
							title: "编辑",
							content: '/web/business/tpAmazonShopExchangeRate/toEdit?id=' + datas[0].id
						});
					}
					break;
				}
			};
		},

		listenMenu10233: function(obj, datas) {//员工个税管理子表
			var t = this;
			switch(obj.event){
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tbUserTaxManageItem/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
		listenMenu10213: function(obj, datas) {//招商信息申请
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl("招商信息申请- 新增","/web/business/thrCanvassApply/toAdd",1);
					break;
				}
				case 'event-to-edit'://编辑
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl('招商信息申请('+datas[0].bid+') - 编辑','/web/business/thrCanvassApply/toEdit?bid=' + datas[0].bid,1);
					}
					break;
				}
				case 'LAYTABLE_EXPORT_DATA'://导出
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/thrCanvassApply/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}

			};
		},

		listenMenu10221: function(obj, datas) {//运营公司档案
			var t = this;
			switch(obj.event){
				case 'event-to-editByOperations'://运营维护
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl('运营公司档案('+datas[0].vgsbm+') - 运营维护','/web/hr/thrOperateCompanyApply/toEdit?id=' + datas[0].id+'&editType=operations',1);
					}
					break;
				}
				case 'event-to-editByMarkets'://市场维护
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl('运营公司档案('+datas[0].vgsbm+') - 市场维护','/web/hr/thrOperateCompanyApply/toEdit?id=' + datas[0].id+'&editType=markets',1);
					}
					break;
				}
				case 'event-to-editByManage'://管理维护
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl('运营公司档案('+datas[0].vgsbm+') - 管理维护','/web/hr/thrOperateCompanyApply/toEdit?id=' + datas[0].id+'&editType=manage',1);
					}
					break;
				}
				case 'LAYTABLE_EXPORT_DATA'://导出
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/thrOperateCompanyApply/exportByArchives',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},

		listenMenu10236: function(obj, datas) {//员工个税税率表
			var t = this;
			switch(obj.event){
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tbUserTaxManage/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-edit'://编辑
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl('员工个税管理 - 编辑', '/web/base/tbUserTaxManage/toEdit?id=' + datas[0].id, 1);
					}
					break;
				}
			};
		},
		listenMenu10237: function(obj, datas) {//岗位职级管理
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "新增",
						content: '/web/hr/tbJobLevel/toAdd'
					});
					break;
				}
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tbJobLevel/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-edit'://编辑
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl('岗位职级管理 - 编辑', '/web/hr/tbJobLevel/toEdit?id=' + datas[0].id, 1);
					}
					break;
				}
			};
		},
		listenMenu10238: function(obj, datas) {//社保管理
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "新增",
						content: '/web/hr/tbSocialSecurity/toAdd'
					});
					break;
				}
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tbSocialSecurity/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-edit'://编辑
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl('社保管理 - 编辑', '/web/hr/tbSocialSecurity/toEdit?id=' + datas[0].id, 1);
					}
					break;
				}
			};
		},
		listenMenu10239: function(obj, datas) {//医保管理
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "新增",
						content: '/web/hr/tbMedicalInsurance/toAdd'
					});
					break;
				}
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tbMedicalInsurance/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-edit'://编辑
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl('医保管理 - 编辑', '/web/hr/tbMedicalInsurance/toEdit?id=' + datas[0].id, 1);
					}
					break;
				}
			};
		},
		listenMenu10240: function(obj, datas) {//公积金管理
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "新增",
						content: '/web/hr/tbProvidentFund/toAdd'
					});
					break;
				}
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tbProvidentFund/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-edit'://编辑
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl('公积金管理 - 编辑', '/web/hr/tbProvidentFund/toEdit?id=' + datas[0].id, 1);
					}
					break;
				}
			};
		},
		listenMenu10241: function(obj, datas) {//考勤管理
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "新增",
						content: '/web/hr/tbAttendance/toAdd'
					});
					break;
				}
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tbAttendance/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-edit'://编辑
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl('岗位职级管理 - 编辑', '/web/hr/tbAttendance/toEdit?id=' + datas[0].id, 1);
					}
					break;
				}
			};
		},
		listenMenu10244: function(obj, datas) {//员工职级管理
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl('员工职级管理 - 新增', '/web/base/tbUserJobLevelManage/toAdd', 1);
					break;
				}
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tbUserJobLevelManage/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-edit'://编辑
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl('员工职级管理 - 编辑', '/web/base/tbUserJobLevelManage/toEdit?id=' + datas[0].id, 1);
					}
					break;
				}
				case 'event-to-push'://薪资绩效推送
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						layer.open({
							shadeClose:true,
							title: '选择绩效月份',
							content: `
								<form class="layui-form">
								  <div class="layui-form-item">
									 <input type="text" class="layui-input" id="tbUserJobLevelManage_choose_month" placeholder="选择绩效月份">
								  </div>
								</form>
							`,
							success: function(layero, index) {},
							yes: function (index, layero) {
								var chooseMonth = $('#tbUserJobLevelManage_choose_month').val();
								if(chooseMonth==undefined || chooseMonth==null || chooseMonth==''){
									layer.alert('请选择绩效月份！');
									return;
								}
								//layer.closeAll();
								layer.msg('处理中', { icon: 16, shade: 0.01 });
								var ids = '';
								for(var i=0;i<datas.length;i++){
									if(ids==''){
										ids = datas[i].id;
									}else {
										ids = ids + ',' +datas[i].id;
									}
								}

								$.ajax({
									type: "POST",
									url: '/api/inter/tbUserJobLevelManage/pushToMonthPerformance',
									data: {ids: ids,chooseMonth:chooseMonth},
									success: function (data) {
										if (data.code == 0) {
											layer.msg(data.msg);
											setTimeout(function(){
												layer.closeAll();
											}, 1000);
										} else {
											layer.msg(data.msg);
											layer.closeAll();
										}
									}
								});
							}
						});
					}
					break;
				}

			};
			layui.use(function(){
				var laydate = layui.laydate;
				// 年月选择器
				laydate.render({
					elem: '#tbUserJobLevelManage_choose_month',
					type: 'month'
				});
			});
		},
		listenMenu10245: function(obj, datas) {//公司信息管理
			var t = this;
			switch(obj.event){
				case 'event-to-update'://编辑
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl('公司信息管理 - 编辑','/web/sys/tbCompanyInfo/toEdit?id=' +  datas[0].id,1);
					}
					break;
				}
			};
		},
		listenMenu10246: function(obj, datas) {// 合作商银行账户管理
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl('合作商银行账户管理 - 新增', '/web/account/tcwPartnerBankInfo/toAdd', 1);
					break;
				}
				case 'event-to-update':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl('合作商银行账户管理 - 编辑','/web/account/tcwPartnerBankInfo/toEdit?id=' +  datas[0].id,1);
					}
					break;
				}
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwPartnerBankInfo/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
		listenMenu10247: function(obj, datas) {// 运营公司银行账户管理
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl('运营公司银行账户管理 - 新增', '/web/sys/thrOperateCompanyBankInfo/toAdd', 1);
					break;
				}
				case 'event-to-update':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl('运营公司银行账户管理 - 编辑','/web/sys/thrOperateCompanyBankInfo/toEdit?id=' +  datas[0].id,1);
					}
					break;
				}
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/thrOperateCompanyBankInfo/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
        listenMenu10248: function(obj, datas) {// 员工银行账户管理
            var t = this;
            switch(obj.event){
                case 'event-to-add':
                {
                    t.openUrl('员工银行账户管理 - 新增', '/web/sys/tsUserBankInfo/toAdd', 1);
                    break;
                }
                case 'event-to-update':
                {
                    if(datas.length == 0) {
                        layer.alert('尚未选中数据');
                    } else if(datas.length > 1) {
                        layer.alert('只能选中一行数据');
                    } else {
                        t.openUrl('员工银行账户管理 - 编辑','/web/sys/tsUserBankInfo/toEdit?id=' +  datas[0].id,1);
                    }
                    break;
                }
                case 'LAYTABLE_EXPORT_DATA':
                {
                    $.ajax({
                        type: "POST",
                        url: '/api/inter/tsUserBankInfo/export',
                        data: t.c.gridObj.getConds(2),
                        success: function (data) {
                            if (data.code == 0) {
                                if(data.msg != undefined && data.msg.startsWith('http')) {
                                    window.open(data.msg);
                                } else {
                                    layer.msg(data.msg);
                                }
                            } else {
                                alert(data.msg);
                            }
                        }
                    });
                    break;
                }
            };
        },
        listenMenu10249: function(obj, datas) {// 公司银行管理
            var t = this;
            switch(obj.event){
                case 'event-to-add':
                {
                    t.openUrl('公司银行账户管理 - 新增', '/web/sys/tbCompanyBankInfo/toAdd', 1);
                    break;
                }
                case 'event-to-update':
                {
                    if(datas.length == 0) {
                        layer.alert('尚未选中数据');
                    } else if(datas.length > 1) {
                        layer.alert('只能选中一行数据');
                    } else {
                        t.openUrl('公司银行账户管理 - 编辑','/web/sys/tbCompanyBankInfo/toEdit?id=' +  datas[0].id,1);
                    }
                    break;
                }
            };
        },
		listenMenu10253: function(obj, datas) {//物料名称维护
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "新增",
						content: '/web/hr/tbMaterial/toAdd'
					});
					break;
				}
				case 'event-to-edit'://编辑
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w=($(window).width()*0.9);
						var h=($(window).height() - 50);
						var index = layer.open({
							type: 2,
							area: [w+'px', h +'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade:0.4,
							title: "编辑",
							content: '/web/hr/tbMaterial/toEdit?id=' + datas[0].id
						});
					}
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tbMaterial/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
		listenMenu10255: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl('物料入库单-新增',"/web/hr/twlStockIn/toAdd",1);
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/twlStockIn/export',

						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
		listenMenu10256: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl('物料出库单-新增',"/web/hr/twlStockOut/toAdd",1);
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/twlStockOut/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
		listenMenu10257: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl('物料转移单-新增',"/web/hr/twlStockTransfer/toAdd",1);
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/twlStockTransfer/export',

						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
		listenMenu10258: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl('物料借用单-新增',"/web/hr/twlStockBorrow/toAdd",1);
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/twlStockBorrow/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
		listenMenu10259: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/twlStockRunning/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
		listenMenu10261: function(obj, datas) {//部门账户管理
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "新增",
						content: '/web/business/tsOrganizationAccount/toAdd'
					});
					break;
				}
				case 'event-to-edit'://编辑
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w=($(window).width()*0.9);
						var h=($(window).height() - 50);
						var index = layer.open({
							type: 2,
							area: [w+'px', h +'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade:0.4,
							title: "编辑",
							content: '/web/business/tsOrganizationAccount/toEdit?id=' + datas[0].id
						});
					}
					break;
				}
			};
		},
		listenMenu10262: function(obj, datas) {//员工月度绩效信息
			var t = this;
			switch(obj.event){
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tbUserMonthPerformance/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-edit'://编辑
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl('员工月度绩效信息 - 编辑', '/web/base/tbUserMonthPerformance/toEdit?id=' + datas[0].id, 1);
					}
					break;
				}
				case 'event-to-push'://生成工资条
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var ids = '';
						for(var i=0;i<datas.length;i++){
							if(ids==''){
								ids = datas[i].id;
							}else {
								ids = ids + ',' +datas[i].id;
							}
						}
						layer.msg('处理中', {
							icon: 16,shade: 0.01
						});
						$.ajax({
							url: '/api/inter/tbUserMonthPerformance/addUserPaySlip',
							data: {ids: ids},
							type: 'POST',
							async: true,
							success: function (res) {
								layer.closeAll();
								layer.alert(res.msg);
								setTimeout(function(){
									//layer.closeAll();
									location.reload();
								}, 3000);

							},
							error: function () {
								layer.close();
								layer.msg("操作失败，请稍后再试！", {icon: 2});
							}
						});
					}
					break;
				}
				case 'event-to-importAttendance'://考勤导入
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var ids = '';
						for(var i=0;i<datas.length;i++){
							if(ids==''){
								ids = datas[i].id;
							}else {
								ids = ids + ',' +datas[i].id;
							}
						}
						layer.msg('处理中', {
							icon: 16,shade: 0.01
						});
						$.ajax({
							url: '/api/inter/tbUserMonthPerformance/updateUserAttendanceId',
							data: {ids: ids},
							type: 'POST',
							async: true,
							success: function (res) {
								layer.closeAll();
								layer.alert(res.msg);
								setTimeout(function(){
									//layer.closeAll();
									location.reload();
								}, 3000);

							},
							error: function () {
								layer.close();
								layer.msg("操作失败，请稍后再试！", {icon: 2});
							}
						});
					}
					break;
					/*
					layer.open({
						shadeClose:true,
						title: '选择要导入的月份',
						content: `
								<form class="layui-form">
								  <div class="layui-form-item">
									 <input type="text" class="layui-input" id="tbUserJobLevelManage_choose_month" placeholder="选择月份">
								  </div>
								</form>
							`,
						success: function(layero, index) {},
						yes: function (index, layero) {
							layer.msg('处理中', {
								icon: 16,shade: 0.01
							});
							var countMonth = $('#tbUserJobLevelManage_choose_month').val();
							$.ajax({
								type: "POST",
								url: '/api/inter/tbUserMonthPerformance/updateUserAttendanceId',
								data: "countMonth="+countMonth,
								success: function (data) {
									if (data.code == 0) {
										layer.msg('成功！');
										setTimeout(function(){
											layer.closeAll();
											location.reload();
										}, 3000);
									} else {
										layer.msg(data.msg);
										layer.closeAll();
									}
								}
							});
						}
					});
					break;

					 */
				}
				case 'event-to-del'://删除
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var ids = '';
						for(var i=0;i<datas.length;i++){
							if(ids==''){
								ids = datas[i].id;
							}else {
								ids = ids + ',' +datas[i].id;
							}
						}
							layer.confirm('确定要删除吗？', {icon: 3}, function () {
								layer.msg('处理中', {
									icon: 16,shade: 0.01
								});
								$.ajax({
									url: '/api/inter/tbUserMonthPerformance/toDel',
									data: {ids: ids},
									type: 'POST',
									async: true,
									success: function (res) {
										layer.msg(res.msg);
										setTimeout(function(){
											layer.close();
											location.reload();
										}, 3000);
									},
									error: function () {
										layer.close();
										layer.msg("删除失败，请稍后再试！", {icon: 2});
									}
								});
							}, function () {});
					}
					break;
				}

				case 'event-to-updateAttendance'://修改考勤状态
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var _list = [];
						for(var i=0;i<datas.length;i++){
							_list[i]=datas[i].id;
						}
						layer.msg('处理中', {
							icon: 16,shade: 0.01
						});
						$.ajax({
							url: '/api/inter/tbUserMonthPerformance/updateAttendanceStatus',
							data: "list="+_list,
							type: 'POST',
							async: true,
							success: function (res) {
								layer.closeAll();
								layer.alert(res.msg);
								setTimeout(function(){
									//layer.closeAll();
									location.reload();
								}, 3000);

							},
							error: function () {
								layer.close();
								layer.msg("操作失败，请稍后再试！", {icon: 2});
							}
						});
					}
					break;
				}

			};
			layui.use(function(){
				var laydate = layui.laydate;
				// 年月选择器
				laydate.render({
					elem: '#tbUserJobLevelManage_choose_month',
					type: 'month'
				});
			});
		},
		listenMenu10263: function(obj, datas) {//员工月度绩效申报
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl('员工月度绩效申报 - 新增', '/web/base/tbUserMonthPerformanceReport/toAdd', 1);
					break;
				}
				case 'event-to-edit'://编辑
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl('员工月度绩效申报('+datas[0].bid+') - 编辑', '/web/base/tbUserMonthPerformanceReport/toEdit?bid=' + datas[0].bid, 1);
					}
					break;
				}
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tbUserMonthPerformanceReport/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
		listenMenu10264: function(obj, datas) {// 员工工资申请单
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl('员工工资申请单 - 新增', '/web/base/tbUserPayApply/toAdd', 1);
					break;
				}
				case 'event-to-cancellation':
				{
					// t.openUrl('员工工资申请单 - 作废', '/web/base/tbUserPayApply/toAdd', 1);
					break;
				}
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tbUserPayApply/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
		listenMenu10265: function(obj, datas) {// 员工考勤信息表
			var t = this;
			switch(obj.event){
				case 'event-to-getcolumnvalByDingDing'://从钉钉获取考勤报表数据
				{
					layer.open({
						shadeClose:true,
						title: '选择月份',
						content: `
								<form class="layui-form">
								  <div class="layui-form-item">
									 <input type="text" class="layui-input" id="tbUserJobLevelManage_choose_month" placeholder="选择月份">
								  </div>
								</form>
							`,
						success: function(layero, index) {},
						yes: function (index, layero) {
							layer.msg('处理中', {
								icon: 16,shade: 0.01
							});
							var countMonth = $('#tbUserJobLevelManage_choose_month').val();
							$.ajax({
								type: "POST",
								url: '/api/inter/tbUserAttendance/getcolumnvalByDingDing',
								data: {countMonth:countMonth},
								success: function (data) {
									if (data.code == 0) {
										layer.msg('成功！');
										setTimeout(function(){
											layer.closeAll();
											location.reload();
										}, 1000);
									} else {
										layer.msg(data.msg);
										layer.closeAll();
									}
								}
							});
						}
					});
					break;
				}
			};
			layui.use(function(){
				var laydate = layui.laydate;
				// 年月选择器
				laydate.render({
					elem: '#tbUserJobLevelManage_choose_month',
					type: 'month'
				});
			});
		},


		listenMenu10266: function(obj, datas) {// 员工工资条信息表
			var t = this;
			switch(obj.event){
				case 'event-to-importUserTax'://个税导入
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var ids = '';
						for(var i=0;i<datas.length;i++){
							if(ids==''){
								ids = datas[i].id;
							}else {
								ids = ids + ',' +datas[i].id;
							}
						}
						layer.msg('处理中', {
							icon: 16,shade: 0.01
						});
						$.ajax({
							url: '/api/inter/tbUserPaySlip/importUserTax',
							data: {ids: ids},
							type: 'POST',
							async: true,
							success: function (res) {
								layer.close();
								layer.msg(res.msg);
								setTimeout(function(){
									location.reload();
								}, 3000);

							},
							error: function () {
								layer.close();
								layer.msg("操作失败，请稍后再试！", {icon: 2});
							}
						});
					}
					break;
				}
				case 'event-to-importYearEndBonus'://年终奖导入
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var ids = '';
						for(var i=0;i<datas.length;i++){
							if(ids==''){
								ids = datas[i].id;
							}else {
								ids = ids + ',' +datas[i].id;
							}
						}
						layer.msg('处理中', {
							icon: 16,shade: 0.01
						});
						$.ajax({
							url: '/api/inter/tbUserPaySlip/importYearEndBonus',
							data: {ids: ids},
							type: 'POST',
							async: true,
							success: function (res) {
								layer.close();
								layer.msg(res.msg);
								setTimeout(function(){
									location.reload();
								}, 3000);

							},
							error: function () {
								layer.close();
								layer.msg("操作失败，请稍后再试！", {icon: 2});
							}
						});
					}
					break;
				}
				case 'event-to-edit'://编辑
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl('员工工资条信息 - 编辑', '/web/base/tbUserPaySlip/toEdit?id=' + datas[0].id, 1);
					}
					break;
				}
				case 'event-to-del'://删除
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var ids = '';
						for(var i=0;i<datas.length;i++){
							if(ids==''){
								ids = datas[i].id;
							}else {
								ids = ids + ',' +datas[i].id;
							}
						}
						layer.confirm('确定要删除吗？', {icon: 3}, function () {
							layer.msg('处理中', {
								icon: 16,shade: 0.01
							});
							$.ajax({
								url: '/api/inter/tbUserPaySlip/toDel',
								data: {ids: ids},
								type: 'POST',
								async: true,
								success: function (res) {
									layer.close();
									layer.msg(res.msg);
									setTimeout(function(){
										location.reload();
									}, 3000);

								},
								error: function () {
									layer.close();
									layer.msg("删除失败，请稍后再试！", {icon: 2});
								}
							});
						}, function () {});
					}
					break;
				}
				case 'LAYTABLE_EXPORT_DATA'://导出
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tbUserPaySlip/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},

		listenMenu10268: function(obj, datas) {//员工月度绩效信息
			var t = this;
			switch(obj.event){
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tbUserPersonalTaxCount/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}

				case 'event-to-del'://删除
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var ids = '';
						for(var i=0;i<datas.length;i++){
							if(ids==''){
								ids = datas[i].id;
							}else {
								ids = ids + ',' +datas[i].id;
							}
						}
						layer.confirm('确定要删除吗？', {icon: 3}, function () {
							layer.msg('处理中', {
								icon: 16,shade: 0.01
							});
							$.ajax({
								url: '/api/inter/tbUserPersonalTaxCount/toDel',
								data: {ids: ids},
								type: 'POST',
								async: true,
								success: function (res) {
									layer.close();
									layer.msg(res.msg);
									setTimeout(function(){
										location.reload();
									}, 3000);
								},
								error: function () {
									layer.close();
									layer.msg("删除失败，请稍后再试！", {icon: 2});
								}
							});
						}, function () {});
					}
					break;
				}

			};

		},
		listenMenu10269: function(obj, datas) {//工资付款单
			var t = this;
			switch(obj.event){
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tbPayrollSlip/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'LAYTABLE_EXPORT_DATA_XQ':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						$.ajax({
							type: "POST",
							url: '/api/inter/tbPayrollSlip/exportxq',
							data: "bid="+datas[0].bid,
							success: function (data) {
								if (data.code == 0) {
									if (data.msg != undefined && data.msg.startsWith('http')) {
										window.open(data.msg);
									} else {
										layer.msg(data.msg);
									}
								} else {
									alert(data.msg);
								}
							}
						});
					}
					break;
				}

				case 'event-to-add':
				{
					t.openUrl("工资付款单 - 新增","/web/base/tbPayrollSlip/toAdd",1);
					break;
				}
				case 'LAYTABLE_EXPORT_DATA_DY':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						$.ajax({
							type: "POST",
							url: '/api/inter/tbPayrollSlip/exportdy',
							data: "bid="+datas[0].bid,
							success: function (data) {
								if (data.code == 0) {
									if (data.msg != undefined && data.msg.startsWith('http')) {
										window.open(data.msg);
									} else {
										layer.msg(data.msg);
									}
								} else {
									alert(data.msg);
								}
							}
						});
					}
					break;
				}

			};

		},
		listenMenu10270: function(obj, datas) {//医保付款单
			var t = this;
			switch(obj.event){
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tbMedicarePay/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-add':
				{
					t.openUrl("医保付款单 - 新增","/web/base/tbMedicarePay/toAdd",1);
					break;
				}
				case 'LAYTABLE_EXPORT_DATA_DY':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						$.ajax({
							type: "POST",
							url: '/api/inter/tbMedicarePay/exportdy',
							data: "bid="+datas[0].bid,
							success: function (data) {
								if (data.code == 0) {
									if (data.msg != undefined && data.msg.startsWith('http')) {
										window.open(data.msg);
									} else {
										layer.msg(data.msg);
									}
								} else {
									alert(data.msg);
								}
							}
						});
					}
					break;
				}
				case 'LAYTABLE_EXPORT_DATA_DYMX':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						$.ajax({
							type: "POST",
							url: '/api/inter/tbMedicarePay/exportdymx',
							data: "bid=" + datas[0].bid,
							success: function (data) {
								if (data.code == 0) {
									if (data.msg != undefined && data.msg.startsWith('http')) {
										window.open(data.msg);
									} else {
										layer.msg(data.msg);
									}
								} else {
									alert(data.msg);
								}
							}
						});
					}
					break;
				}
			};
		},
		listenMenu10271: function(obj, datas) {//社保付款单
			var t = this;
			switch(obj.event){
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tbSocialSecurityPay/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-add':
				{
					t.openUrl("社保付款单 - 新增","/web/base/tbSocialSecurityPay/toAdd",1);
					break;
				}
				case 'LAYTABLE_EXPORT_DATA_DY':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						$.ajax({
							type: "POST",
							url: '/api/inter/tbSocialSecurityPay/exportdy',
							data: "bid="+datas[0].bid,
							success: function (data) {
								if (data.code == 0) {
									if (data.msg != undefined && data.msg.startsWith('http')) {
										window.open(data.msg);
									} else {
										layer.msg(data.msg);
									}
								} else {
									alert(data.msg);
								}
							}
						});
					}
					break;
				}
				case 'LAYTABLE_EXPORT_DATA_DYMX':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						$.ajax({
							type: "POST",
							url: '/api/inter/tbSocialSecurityPay/exportdymx',
							data: "bid=" + datas[0].bid,
							success: function (data) {
								if (data.code == 0) {
									if (data.msg != undefined && data.msg.startsWith('http')) {
										window.open(data.msg);
									} else {
										layer.msg(data.msg);
									}
								} else {
									alert(data.msg);
								}
							}
						});
					}
					break;
				}
			};
		},
		listenMenu10272: function(obj, datas) {//公积金付款单
			var t = this;
			switch(obj.event){
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tbReservedPay/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-add':
				{
					t.openUrl("公积金付款单 - 新增","/web/base/tbReservedPay/toAdd",1);
					break;
				}
				case 'LAYTABLE_EXPORT_DATA_DY':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						$.ajax({
							type: "POST",
							url: '/api/inter/tbReservedPay/exportdy',
							data: "bid="+datas[0].bid,
							success: function (data) {
								if (data.code == 0) {
									if (data.msg != undefined && data.msg.startsWith('http')) {
										window.open(data.msg);
									} else {
										layer.msg(data.msg);
									}
								} else {
									alert(data.msg);
								}
							}
						});
					}
					break;
				}
				case 'LAYTABLE_EXPORT_DATA_DYMX':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						$.ajax({
							type: "POST",
							url: '/api/inter/tbReservedPay/exportdymx',
							data: "bid=" + datas[0].bid,
							success: function (data) {
								if (data.code == 0) {
									if (data.msg != undefined && data.msg.startsWith('http')) {
										window.open(data.msg);
									} else {
										layer.msg(data.msg);
									}
								} else {
									alert(data.msg);
								}
							}
						});
					}
					break;
				}
			};
		},
		listenMenu10273: function(obj, datas) {//个税付款单
			var t = this;
			switch(obj.event){
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tbIncomePay/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-add':
				{
					t.openUrl("个税付款单 - 新增","/web/base/tbIncomePay/toAdd",1);
					break;
				}
				case 'LAYTABLE_EXPORT_DATA_DY':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						$.ajax({
							type: "POST",
							url: '/api/inter/tbIncomePay/exportdy',
							data: "bid="+datas[0].bid,
							success: function (data) {
								if (data.code == 0) {
									if (data.msg != undefined && data.msg.startsWith('http')) {
										window.open(data.msg);
									} else {
										layer.msg(data.msg);
									}
								} else {
									alert(data.msg);
								}
							}
						});
					}
					break;
				}
			};
		},

		listenMenu10277: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/twlStockFrozenRunning/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
		listenMenu10278: function(obj, datas) {//预支类型维护
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "新增",
						content: '/web/account/tbAdvanceType/toAdd'
					});
					break;
				}
				case 'event-to-edit'://编辑
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w=($(window).width()*0.9);
						var h=($(window).height() - 50);
						var index = layer.open({
							type: 2,
							area: [w+'px', h +'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade:0.4,
							title: "编辑",
							content: '/web/account/tbAdvanceType/toEdit?id=' + datas[0].id
						});
					}
					break;
				}
				case 'LAYTABLE_EXPORT_DATA'://导出
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tbAdvanceType/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},

		listenMenu10280: function(obj, datas) {//预支账户管理
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "新增",
						content: '/web/account/tcwAdvanceAccount/toAdd'
					});
					break;
				}
				case 'event-to-edit'://编辑
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w=($(window).width()*0.9);
						var h=($(window).height() - 50);
						var index = layer.open({
							type: 2,
							area: [w+'px', h +'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade:0.4,
							title: "编辑",
							content: '/web/account/tcwAdvanceAccount/toEdit?id=' + datas[0].id
						});
					}
					break;
				}
				case 'event-to-stop'://停用
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var _list = [];
						for(var i=0;i<datas.length;i++){
							_list[i]=datas[i].id;
						}
						layer.confirm('确定要停用吗？', {icon: 3}, function () {
							layer.msg('处理中', {
								icon: 16,shade: 0.01
							});
							$.ajax({
								url: '/api/inter/tbAdvanceType/updateStatusStop',
								data: "list="+_list,
								type: 'POST',
								async: true,
								success: function (res) {
									layer.close();
									location.reload();
									layer.msg(res.msg);
								},
								error: function () {
									layer.close();
									layer.msg("删除失败，请稍后再试！", {icon: 2});
								}
							});
						}, function () {});
					}
					break;
				}
				case 'LAYTABLE_EXPORT_DATA'://导出
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwAdvanceAccountDetail/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},

		listenMenu10282: function(obj, datas) {//预支账户充值单
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					/*
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "新增",
						content: '/web/account/tcwAdvanceAccountRecharge/toAdd'
					});

					 */
					t.openUrl("预支账户充值单 - 新增","/web/account/tcwAdvanceAccountRecharge/toAdd",1);
					break;
				}
				case 'event-to-edit'://编辑
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						/*
						var w=($(window).width()*0.9);
						var h=($(window).height() - 50);
						var index = layer.open({
							type: 2,
							area: [w+'px', h +'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade:0.4,
							title: "编辑",
							content: '/web/account/tcwAdvanceAccountRecharge/toEdit?bid=' + datas[0].bid
						});
						 */
						t.openUrl("预支账户充值单 - 编辑",'/web/account/tcwAdvanceAccountRecharge/toEdit?bid=' + datas[0].bid,1);
					}
					break;
				}
				case 'LAYTABLE_EXPORT_DATA'://导出
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwAdvanceAccountRecharge/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-exportdy':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						$.ajax({
							type: "POST",
							url: '/api/inter/tcwAdvanceAccountRecharge/exportdy',
							data: {bid:datas[0].bid},
							success: function (data) {
								if (data.code == 0) {
									if (data.msg != undefined && data.msg.startsWith('http')) {
										window.open(data.msg);
									} else {
										layer.msg(data.msg);
									}
								} else {
									alert(data.msg);
								}
							}
						});
					}
					break;
				}
			};
		},

		listenMenu10283: function(obj, datas) {//预支账户报销单
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl("预支账户报销单 - 新增","/web/account/tcwAdvanceAccountReimbursement/toAdd",1);
					break;
				}
				case 'event-to-edit'://编辑
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl("预支账户报销单 - 编辑","/web/account/tcwAdvanceAccountReimbursement/toEdit?bid=" + datas[0].bid,1);
						break;
					}
				}
				case 'LAYTABLE_EXPORT_DATA'://导出
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwAdvanceAccountReimbursement/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},

		listenMenu10285: function(obj, datas) {//应付类型维护
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "新增",
						content: '/web/account/tbNeedPayType/toAdd'
					});
					break;
				}
				case 'event-to-edit'://编辑
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w=($(window).width()*0.9);
						var h=($(window).height() - 50);
						var index = layer.open({
							type: 2,
							area: [w+'px', h +'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade:0.4,
							title: "编辑",
							content: '/web/account/tbNeedPayType/toEdit?id=' + datas[0].id
						});
					}
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tbNeedPayType/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
		listenMenu10286: function(obj, datas) { // 应付账户管理
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "新增",
						content: '/web/account/tcwNeedPayAccount/toAdd'
					});
					break;
				}
				case 'event-to-edit'://编辑
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w=($(window).width()*0.9);
						var h=($(window).height() - 50);
						var index = layer.open({
							type: 2,
							area: [w+'px', h +'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade:0.4,
							title: "编辑",
							content: '/web/account/tcwNeedPayAccount/toEdit?id=' + datas[0].id
						});
					}
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwNeedPayAccount/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
		listenMenu10287: function(obj, datas) { // 应付台账明细
			var t = this;
			switch(obj.event){
				case 'event-to-batch-add':
				{
					t.openUrl("应付台账明细 - 新增","/web/account/tcwNeedPayLedgerDetail/toAdd",1);
					break;
				}
				case 'event-to-edit'://编辑
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w=($(window).width()*0.9);
						var h=($(window).height() - 50);
						var index = layer.open({
							type: 2,
							area: [w+'px', h +'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade:0.4,
							title: "编辑",
							content: '/web/account/tcwNeedPayLedgerDetail/toEdit?id=' + datas[0].id
						});
					}
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwNeedPayLedgerDetail/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}

				case 'event-to-doTransferFlow'://划拨
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var ids = '';
						for(var i=0;i<datas.length;i++){
							if(ids==''){
								ids = datas[i].id;
							}else {
								ids = ids + ',' +datas[i].id;
							}
						}
						layer.msg('处理中', {
							icon: 16,shade: 0.01
						});
						$.ajax({
							url: '/api/inter/tcwNeedPayLedgerDetail/doTransferFlow',
							data: {ids: ids},
							type: 'POST',
							async: true,
							success: function (res) {
								layer.closeAll();
								layer.alert(res.msg);
								setTimeout(function(){
									//layer.closeAll();
									location.reload();
								}, 3000);

							},
							error: function () {
								layer.close();
								layer.msg("操作失败，请稍后再试！", {icon: 2});
							}
						});
					}
					break;
				}


				case 'event-to-copy'://复制
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var ids = '';
						for(var i=0;i<datas.length;i++){
							if(ids==''){
								ids = datas[i].id;
							}else {
								ids = ids + ',' +datas[i].id;
							}
						}
						layer.msg('处理中', { icon: 16,shade: 0.01 });
						$.ajax({
							url: '/api/inter/tcwNeedPayLedgerDetail/doCopy',
							data: {ids: ids},
							type: 'POST',
							async: true,
							success: function (res) {
								layer.closeAll();
								layer.alert(res.msg);
								setTimeout(function(){
									location.reload();
								}, 3000);
							},
							error: function () {
								layer.close();
								layer.msg("操作失败，请稍后再试！", {icon: 2});
							}
						});
					}
					break;
				}


				case 'event-to-del'://删除
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var ids = '';
						for(var i=0;i<datas.length;i++){
							if(ids==''){
								ids = datas[i].id;
							}else {
								ids = ids + ',' +datas[i].id;
							}
						}
						layer.msg('处理中', { icon: 16,shade: 0.01 });
						$.ajax({
							url: '/api/inter/tcwNeedPayLedgerDetail/doDelByList',
							data: {ids: ids},
							type: 'POST',
							async: true,
							success: function (res) {
								layer.closeAll();
								layer.alert(res.msg);
								setTimeout(function(){
									location.reload();
								}, 3000);
							},
							error: function () {
								layer.close();
								layer.msg("操作失败，请稍后再试！", {icon: 2});
							}
						});
					}
					break;
				}


				case 'event-to-setUnitPrice'://批量设置成本价
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var ids = '';
						for(var i=0;i<datas.length;i++){
							if(ids==''){
								ids = datas[i].id;
							}else {
								ids = ids + ',' +datas[i].id;
							}
						}
						var util = layui.util;
						layer.prompt({title: '请输入成本价'}, function(value, index, elem){
							if(value === '') return elem.focus();
							var unitPrice = util.escape(value);
							// 关闭 prompt
							layer.close(index);

							layer.msg('处理中', { icon: 16,shade: 0.01 });
							$.ajax({
								url: '/api/inter/tcwNeedPayLedgerDetail/setUnitPrice',
								data: {ids: ids,unitPrice: unitPrice},
								type: 'POST',
								async: true,
								success: function (res) {
									layer.closeAll();
									layer.alert(res.msg);
									setTimeout(function(){
										location.reload();
									}, 3000);
								},
								error: function () {
									layer.close();
									layer.msg("操作失败，请稍后再试！", {icon: 2});
								}
							});

						});


					}
					break;
				}



				case 'event-to-setProxyPrice'://批量设置代理价
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var ids = '';
						for(var i=0;i<datas.length;i++){
							if(ids==''){
								ids = datas[i].id;
							}else {
								ids = ids + ',' +datas[i].id;
							}
						}
						var util = layui.util;
						layer.prompt({title: '请输入代理价'}, function(value, index, elem){
							if(value === '') return elem.focus();
							var proxyPrice = util.escape(value);
							// 关闭 prompt
							layer.close(index);
							layer.msg('处理中', { icon: 16,shade: 0.01 });
							$.ajax({
								url: '/api/inter/tcwNeedPayLedgerDetail/setProxyPrice',
								data: {ids: ids,proxyPrice: proxyPrice},
								type: 'POST',
								async: true,
								success: function (res) {
									layer.closeAll();
									layer.alert(res.msg);
									setTimeout(function(){
										location.reload();
									}, 3000);
								},
								error: function () {
									layer.close();
									layer.msg("操作失败，请稍后再试！", {icon: 2});
								}
							});

						});


					}
					break;
				}


				case 'event-to-setPayedPrice'://批量设置已付金额
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var ids = '';
						for(var i=0;i<datas.length;i++){
							if(ids==''){
								ids = datas[i].id;
							}else {
								ids = ids + ',' +datas[i].id;
							}
						}
						var util = layui.util;
						layer.prompt({title: '请输入已付金额'}, function(value, index, elem){
							if(value === '') return elem.focus();
							var payedPrice = util.escape(value);
							// 关闭 prompt
							layer.close(index);
							layer.msg('处理中', { icon: 16,shade: 0.01 });
							$.ajax({
								url: '/api/inter/tcwNeedPayLedgerDetail/setPayedPrice',
								data: {ids: ids,payedPrice: payedPrice},
								type: 'POST',
								async: true,
								success: function (res) {
									layer.closeAll();
									layer.alert(res.msg);
									setTimeout(function(){
										location.reload();
									}, 3000);
								},
								error: function () {
									layer.close();
									layer.msg("操作失败，请稍后再试！", {icon: 2});
								}
							});

						});


					}
					break;
				}


				case 'event-to-setNeedPayType'://批量修改应付类型
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var ids = '';
						for(var i=0;i<datas.length;i++){
							if(ids==''){
								ids = datas[i].id;
							}else {
								ids = ids + ',' +datas[i].id;
							}
						}
						window.matchValuesAfterModalSelectRadio = function(colCode, data, extraData) {
							console.log('data =',data);
							//var _list = [data.vGsBm];
							layer.msg('处理中', { icon: 16,shade: 0.01 });
							$.ajax({
								url: '/api/inter/tcwNeedPayLedgerDetail/setNeedPayType',
								data: {ids: ids,needPayTypeCode: data.code},
								type: 'POST',
								async: true,
								success: function (res) {
									layer.closeAll();
									layer.alert(res.msg);
									setTimeout(function(){
										location.reload();
									}, 3000);
								},
								error: function () {
									layer.close();
									layer.msg("操作失败，请稍后再试！", {icon: 2});
								}
							});
						};
						layui.YsModal.init({modalKey: 'TB_NeedPayType', colCode: 'aaaa', parentObj: window});
						break;
					}
					break;
				}



				case 'event-to-setVjylx'://批量修改交易类型
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var ids = '';
						for(var i=0;i<datas.length;i++){
							if(ids==''){
								ids = datas[i].id;
							}else {
								ids = ids + ',' +datas[i].id;
							}
						}
						window.matchValuesAfterModalSelectRadio = function(colCode, data, extraData) {
							console.log('data =',data);
							//var _list = [data.vGsBm];
							layer.msg('处理中', { icon: 16,shade: 0.01 });
							$.ajax({
								url: '/api/inter/tcwNeedPayLedgerDetail/setVjylx',
								data: {ids: ids,vjylx: data.vReMark},
								type: 'POST',
								async: true,
								success: function (res) {
									layer.closeAll();
									layer.alert(res.msg);
									setTimeout(function(){
										location.reload();
									}, 3000);
								},
								error: function () {
									layer.close();
									layer.msg("操作失败，请稍后再试！", {icon: 2});
								}
							});
						};
						layui.YsModal.init({modalKey: 'TB_BaseInfo_ByJylx', colCode: 'aaaa', parentObj: window});
						break;
					}
					break;
				}

			};
		},
		listenMenu10288: function(obj, datas) { // 应付账户支付
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl("应付账户支付 - 新增", "/web/account/tcwNeedPayAccountPay/toAdd",1);
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwNeedPayAccountPay/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-exportdy':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						$.ajax({
							type: "POST",
							url: '/api/inter/tcwNeedPayAccountPay/exportdy',
							data: {bid:datas[0].bid},
							success: function (data) {
								if (data.code == 0) {
									if (data.msg != undefined && data.msg.startsWith('http')) {
										window.open(data.msg);
									} else {
										layer.msg(data.msg);
									}
								} else {
									alert(data.msg);
								}
							}
						});
					}
					break;
				}
			};
		},
		listenMenu10291: function(obj, datas) {//预支账户归还单
			var t = this;
			switch(obj.event){
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwAdvanceAccountBack/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-add':
				{
					/*
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "预支账户归还单 - 新增",
						content: "/web/account/tcwAdvanceAccountBack/toAdd"
					});
					 */
					t.openUrl("预支账户归还单 - 新增","/web/account/tcwAdvanceAccountBack/toAdd",1);
					break;
				}
			};
		},

		listenMenu10281: function(obj, datas) {//预支台账明细
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl("预支台账明细 - 新增","/web/account/tcwAdvanceAccount/toAddListByEdit",1);
					break;
				}
				case 'event-to-edit'://编辑
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w=($(window).width()*0.9);
						var h=($(window).height() - 50);
						var index = layer.open({
							type: 2,
							area: [w+'px', h +'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade:0.4,
							title: "编辑",
							content: "/web/account/tcwAdvanceAccountDetail/toEdit?id=" + datas[0].id
						});
						//t.openUrl("预支台账明细 - 编辑","/web/account/tcwAdvanceAccountDetail/toEdit?id=" + datas[0].id,1);
					}
					break;
				}
				case 'LAYTABLE_EXPORT_DATA'://导出
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwAdvanceAccountDetail/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}

				case 'event-to-doTransferFlow'://划拨
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var ids = '';
						for(var i=0;i<datas.length;i++){
							if(ids==''){
								ids = datas[i].id;
							}else {
								ids = ids + ',' +datas[i].id;
							}
						}
						layer.msg('处理中', { icon: 16,shade: 0.01 });
						$.ajax({
							url: '/api/inter/tcwAdvanceAccountDetail/doTransferFlow',
							data: {ids: ids},
							type: 'POST',
							async: true,
							success: function (res) {
								layer.closeAll();
								layer.alert(res.msg);
								setTimeout(function(){
									location.reload();
								}, 3000);
							},
							error: function () {
								layer.close();
								layer.msg("操作失败，请稍后再试！", {icon: 2});
							}
						});
					}
					break;
				}


				case 'event-to-copy'://复制
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var ids = '';
						for(var i=0;i<datas.length;i++){
							if(ids==''){
								ids = datas[i].id;
							}else {
								ids = ids + ',' +datas[i].id;
							}
						}
						layer.msg('处理中', { icon: 16,shade: 0.01 });
						$.ajax({
							url: '/api/inter/tcwAdvanceAccountDetail/doCopy',
							data: {ids: ids},
							type: 'POST',
							async: true,
							success: function (res) {
								layer.closeAll();
								layer.alert(res.msg);
								setTimeout(function(){
									location.reload();
								}, 3000);
							},
							error: function () {
								layer.close();
								layer.msg("操作失败，请稍后再试！", {icon: 2});
							}
						});
					}
					break;
				}


				case 'event-to-del'://删除
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var ids = '';
						for(var i=0;i<datas.length;i++){
							if(ids==''){
								ids = datas[i].id;
							}else {
								ids = ids + ',' +datas[i].id;
							}
						}
						layer.msg('处理中', { icon: 16,shade: 0.01 });
						$.ajax({
							url: '/api/inter/tcwAdvanceAccountDetail/doDelByList',
							data: {ids: ids},
							type: 'POST',
							async: true,
							success: function (res) {
								layer.closeAll();
								layer.alert(res.msg);
								setTimeout(function(){
									location.reload();
								}, 3000);
							},
							error: function () {
								layer.close();
								layer.msg("操作失败，请稍后再试！", {icon: 2});
							}
						});
					}
					break;
				}


				case 'event-to-setUnitPrice'://批量设置成本价
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var ids = '';
						for(var i=0;i<datas.length;i++){
							if(ids==''){
								ids = datas[i].id;
							}else {
								ids = ids + ',' +datas[i].id;
							}
						}
						var util = layui.util;
						layer.prompt({title: '请输入成本价'}, function(value, index, elem){
							if(value === '') return elem.focus();
							var unitPrice = util.escape(value);
							// 关闭 prompt
							layer.close(index);

							layer.msg('处理中', { icon: 16,shade: 0.01 });
							$.ajax({
								url: '/api/inter/tcwAdvanceAccountDetail/setUnitPrice',
								data: {ids: ids,unitPrice: unitPrice},
								type: 'POST',
								async: true,
								success: function (res) {
									layer.closeAll();
									layer.alert(res.msg);
									setTimeout(function(){
										location.reload();
									}, 3000);
								},
								error: function () {
									layer.close();
									layer.msg("操作失败，请稍后再试！", {icon: 2});
								}
							});

						});


					}
					break;
				}



				case 'event-to-setProxyPrice'://批量设置代理价
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var ids = '';
						for(var i=0;i<datas.length;i++){
							if(ids==''){
								ids = datas[i].id;
							}else {
								ids = ids + ',' +datas[i].id;
							}
						}
						var util = layui.util;
						layer.prompt({title: '请输入代理价'}, function(value, index, elem){
							if(value === '') return elem.focus();
							var proxyPrice = util.escape(value);
							// 关闭 prompt
							layer.close(index);
							layer.msg('处理中', { icon: 16,shade: 0.01 });
							$.ajax({
								url: '/api/inter/tcwAdvanceAccountDetail/setProxyPrice',
								data: {ids: ids,proxyPrice: proxyPrice},
								type: 'POST',
								async: true,
								success: function (res) {
									layer.closeAll();
									layer.alert(res.msg);
									setTimeout(function(){
										location.reload();
									}, 3000);
								},
								error: function () {
									layer.close();
									layer.msg("操作失败，请稍后再试！", {icon: 2});
								}
							});

						});


					}
					break;
				}


				case 'event-to-setAdvanceType'://批量修改预支类型
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var ids = '';
						for(var i=0;i<datas.length;i++){
							if(ids==''){
								ids = datas[i].id;
							}else {
								ids = ids + ',' +datas[i].id;
							}
						}
						window.matchValuesAfterModalSelectRadio = function(colCode, data, extraData) {
							console.log('data =',data);
							//var _list = [data.vGsBm];
							layer.msg('处理中', { icon: 16,shade: 0.01 });
							$.ajax({
								url: '/api/inter/tcwAdvanceAccountDetail/setAdvanceType',
								data: {ids: ids,advanceTypeCode: data.code},
								type: 'POST',
								async: true,
								success: function (res) {
									layer.closeAll();
									layer.alert(res.msg);
									setTimeout(function(){
										location.reload();
									}, 3000);
								},
								error: function () {
									layer.close();
									layer.msg("操作失败，请稍后再试！", {icon: 2});
								}
							});
						};
						layui.YsModal.init({modalKey: 'TB_AdvanceType', colCode: 'aaaa', parentObj: window});
						break;
					}
					break;
				}

			};
		},
		listenMenu10295: function(obj, datas) {// 平台维护
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "新增",
						content: '/web/base/tbPlatform/toAdd'
					});
					break;
				}
				case 'event-to-edit'://编辑
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w=($(window).width()*0.9);
						var h=($(window).height() - 50);
						var index = layer.open({
							type: 2,
							area: [w+'px', h +'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade:0.4,
							title: "编辑",
							content: '/web/base/tbPlatform/toEdit?id=' + datas[0].id
						});
					}
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tbPlatform/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
		listenMenu10296: function(obj, datas) {// 资金登记单
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl("资金登记单 - 新增","/web/finance/tcwCapitalRegister/toAdd",1);
					break;
				}
				case 'LAYTABLE_EXPORT_DATA'://导出
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwCapitalRegister/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
		listenMenu10297: function(obj, datas) {// 合作商外币账户管理
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl("合作商外币账户 - 新增","/web/finance/tcwPartnerWbAccount/toAdd",1);
					break;
				}
				case 'event-to-update':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl("合作商外币账户 - 编辑","/web/finance/tcwPartnerWbAccount/toEdit?id=" + datas[0].id,1);
					}
					break;
				}
			};
		},
		listenMenu10298: function(obj, datas) {//透明计划申报
			var t = this;
			switch(obj.event){
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/thrTransparencyProgram/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-add':
				{
					t.openUrl("透明计划申报 - 新增","/web/hr/thrTransparencyProgram/toAdd",1);
					break;
				}

				case 'event-to-cancel':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var row = datas[0];
						layui.layer.confirm("作废后不可恢复，确定作废？",{
							btn: ['确定', '取消']
						}, function (index) {
							$.ajax({
								type: "POST",
								url: '/api/inter/thrTransparencyProgram/cancel',
								data: {bid: row.bid,id: row.transparencyProgramId},
								success: function (data) {
									if (data.code == 0) {
										location.reload();
									} else {
										alert(data.msg);
									}
								}
							});
							layer.close(index);
						});
					}
					break;
				}
			};
		},
		listenMenu10299: function(obj, datas) {// 平台维护
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "新增",
						content: '/web/base/tpAmazonRegion/toAdd'
					});
					break;
				}
				case 'event-to-edit'://编辑
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w=($(window).width()*0.9);
						var h=($(window).height() - 50);
						var index = layer.open({
							type: 2,
							area: [w+'px', h +'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade:0.4,
							title: "编辑",
							content: '/web/base/tpAmazonRegion/toEdit?id=' + datas[0].id
						});
					}
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tpAmazonRegion/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
		listenMenu10300: function(obj, datas) {// 平台维护
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "新增",
						content: '/web/base/tbCountry/toAdd'
					});
					break;
				}
				case 'event-to-edit'://编辑
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w=($(window).width()*0.9);
						var h=($(window).height() - 50);
						var index = layer.open({
							type: 2,
							area: [w+'px', h +'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade:0.4,
							title: "编辑",
							content: '/web/base/tbCountry/toEdit?id=' + datas[0].id
						});
					}
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tbCountry/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
		listenMenu10301: function(obj, datas) {// 平台卖家管理
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "新增",
						content: '/web/business/tpAmazonSeller/toAdd'
					});
					break;
				}
				case 'event-to-edit'://编辑
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w=($(window).width()*0.9);
						var h=($(window).height() - 50);
						var index = layer.open({
							type: 2,
							area: [w+'px', h +'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade:0.4,
							title: "编辑",
							content: '/web/business/tpAmazonSeller/toEdit?id=' + datas[0].id
						});
					}
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tpAmazonSeller/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
		listenMenu10302: function(obj, datas) {// 平台店铺管理
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "新增",
						content: '/web/business/tpAmazonShop/toAdd'
					});
					break;
				}
				case 'event-to-edit'://编辑
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w=($(window).width()*0.9);
						var h=($(window).height() - 50);
						var index = layer.open({
							type: 2,
							area: [w+'px', h +'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade:0.4,
							title: "编辑",
							content: '/web/business/tpAmazonShop/toEdit?id=' + datas[0].id
						});
					}
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tpAmazonShop/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-auth-amazon-seller':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						$.ajax({
							type: "POST",
							url: '/api/inter/tpAmazonShop/getAmazonAuthUrl',
							data: {
								shopId: datas[0].id
							},
							success: function (data) {
								if (data.code == 0) {
									if(data.msg != undefined && data.msg.startsWith('http')) {
										window.open(data.msg);
									} else {
										layer.msg(data.msg);
									}
								} else {
									alert(data.msg);
								}
							}
						});
					}
					break;
				}
				case 'event-to-auth-amazon-advert':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						$.ajax({
							type: "POST",
							url: '/api/inter/tpAmazonShop/getAmazonAuthUrlGg',
							data: {
								shopId: datas[0].id
							},
							success: function (data) {
								if (data.code == 0) {
									if(data.msg != undefined && data.msg.startsWith('http')) {
										window.open(data.msg);
									} else {
										layer.msg(data.msg);
									}
								} else {
									alert(data.msg);
								}
							}
						});
					}
					break;
				}
			};
		},
		listenMenu10303: function(obj, datas) {// VAT付款账户管理
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "新增",
						content: '/web/business/tcwVatPaymentAccount/toAdd'
					});
					break;
				}
				case 'event-to-edit':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w = ($(window).width() * 0.9);
						var h = ($(window).height() - 50);
						var index = layer.open({
							type: 2,
							area: [w + 'px', h + 'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade: 0.4,
							title: "编辑",
							content: '/web/business/tcwVatPaymentAccount/toEdit?id=' + datas[0].id
						});
					}
					break;
				}
			};
		},
		listenMenu10305: function(obj, datas) {// 平台服务付款账户管理
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "新增",
						content: '/web/business/tbPlatformServicePayAccount/toAdd'
					});
					break;
				}
				case 'event-to-edit':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w = ($(window).width() * 0.9);
						var h = ($(window).height() - 50);
						var index = layer.open({
							type: 2,
							area: [w + 'px', h + 'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade: 0.4,
							title: "编辑",
							content: '/web/business/tbPlatformServicePayAccount/toEdit?id=' + datas[0].id
						});
					}
					break;
				}
			};
		},

		listenMenu10304: function(obj, datas) {// 资金登记认领表
			var t = this;
			switch(obj.event){
				case 'LAYTABLE_EXPORT_DATA'://导出
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwCapitalRegisterClaim/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-back'://退回
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var ids = '';
						for(var i=0;i<datas.length;i++){
							if(ids==''){
								ids = datas[i].id;
							}else {
								ids = ids + ',' +datas[i].id;
							}
						}
						layer.msg('处理中', {
							icon: 16,shade: 0.01
						});
						$.ajax({
							url: '/api/inter/tcwCapitalRegisterClaim/toBack',
							data: {ids:ids},
							type: 'POST',
							async: true,
							success: function (res) {
								layer.closeAll();
								layer.msg(res.msg);
								setTimeout(function(){
									location.reload();
								}, 3000);

							},
							error: function () {
								layer.close();
								layer.msg("操作失败，请稍后再试！", {icon: 2});
							}
						});
					}
					break;
				}
				case 'LAYTABLE_EXPORT_DATA_DY': {
					if (datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if (datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						$.ajax({
							type: "POST",
							url: '/api/inter/tcwCapitalRegisterClaim/exportdy',
							data: "id=" + datas[0].id,
							success: function (data) {
								if (data.code == 0) {
									if (data.msg != undefined && data.msg.startsWith('http')) {
										window.open(data.msg);
									} else {
										layer.msg(data.msg);
									}
								} else {
									alert(data.msg);
								}
							}
						});
					}
					break;
				}
			};
		},

		listenMenu10306: function(obj, datas) {// 预付款认领单
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl("预付款认领单 - 新增","/web/finance/tcwCapitalBusinessCost/toAdd",1);
					break;
				}
				case 'LAYTABLE_EXPORT_DATA'://导出
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwCapitalBusinessCost/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
                case 'LAYTABLE_EXPORT_DATA_DY': {
					if (datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if (datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						$.ajax({
							type: "POST",
							url: '/api/inter/tcwCapitalBusinessCost/exportdy',
							data: "bid=" + datas[0].bid,
							success: function (data) {
								if (data.code == 0) {
									if (data.msg != undefined && data.msg.startsWith('http')) {
										window.open(data.msg);
									} else {
										layer.msg(data.msg);
									}
								} else {
									alert(data.msg);
								}
							}
						});
					}
					break;
				}
			};
		},
		listenMenu10308: function(obj, datas) {//Amazon商品管理
			var t = this;
			switch(obj.event){
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tpAmazonShopProduct/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-manua':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var _list = [];
						for(var i=0;i<datas.length;i++){
							_list[i]=datas[i].id;
						}
						layer.confirm('确定要手动获取？', {icon: 3}, function () {
							var indexOfLoading = layer.load(1, {shade: [0.5,'#000000']});
							$.ajax({
								url: '/api/inter/tpAmazonShopProduct/manua',
								data: "list="+_list,
								type: 'POST',
								async: true,
								success: function (res) {
									layer.close();
									location.reload();
									layer.msg(res.msg);
								},
								error: function () {
									layer.close();
									layer.msg("删除失败，请稍后再试！", {icon: 2});
								}
							});
						}, function () {});
					}
					break;
					break;
				}
			};
		},

		listenMenu10310: function(obj, datas) {//存款账户管理
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "新增",
						content: '/web/finance/tcwDepositPlatform/toAdd'
					});
					break;
				}
				case 'event-to-edit':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w = ($(window).width() * 0.9);
						var h = ($(window).height() - 50);
						var index = layer.open({
							type: 2,
							area: [w + 'px', h + 'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade: 0.4,
							title: "编辑",
							content: '/web/finance/tcwDepositPlatform/toEdit?id=' + datas[0].id
						});
					}
					break;
				}
				case 'LAYTABLE_EXPORT_DATA'://导出
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwDepositPlatform/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},

		listenMenu10311: function(obj, datas) {//存款账户平台管理
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "新增",
						content: '/web/finance/tcwDepositPlatformAccount/toAdd'
					});
					break;
				}
				case 'event-to-edit':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w = ($(window).width() * 0.9);
						var h = ($(window).height() - 50);
						var index = layer.open({
							type: 2,
							area: [w + 'px', h + 'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade: 0.4,
							title: "编辑",
							content: '/web/finance/tcwDepositPlatformAccount/toEdit?code=' + datas[0].code
						});
					}
					break;
				}
				case 'LAYTABLE_EXPORT_DATA'://导出
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwDepositPlatformAccount/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},

		listenMenu10312: function(obj, datas) {// 资金认领单
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl("资金认领单 - 新增","/web/finance/tcwCapitalClaim/toAdd",1);
					break;
				}
				case 'LAYTABLE_EXPORT_DATA'://导出
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwCapitalClaim/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'LAYTABLE_EXPORT_DATA_DY': {
					if (datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if (datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						$.ajax({
							type: "POST",
							url: '/api/inter/tcwCapitalClaim/exportdy',
							data: "bid=" + datas[0].bid,
							success: function (data) {
								if (data.code == 0) {
									if (data.msg != undefined && data.msg.startsWith('http')) {
										window.open(data.msg);
									} else {
										layer.msg(data.msg);
									}
								} else {
									alert(data.msg);
								}
							}
						});
					}
					break;
				}

			};
		},

		listenMenu10313: function(obj, datas) {// 运营公司表VPS信息
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl("运营公司表VPS信息 - 新增","/web/business/thrOperateCompanyVps/toAdd",1);
					break;
				}
				case 'event-to-edit':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl("运营公司表VPS信息 - 编辑","/web/business/thrOperateCompanyVps/toEdit?id="+ datas[0].id,1);
					}
					break;
				}
				case 'LAYTABLE_EXPORT_DATA'://导出
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/thrOperateCompanyVps/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-del': {
					if (datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var ids = '';
						for(var i=0;i<datas.length;i++){
							if(ids==''){
								ids = datas[i].id;
							}else {
								ids = ids + ',' +datas[i].id;
							}
						}
						layer.confirm('确定要删除吗？', { icon: 3 }, function() {
							layer.msg('处理中', { icon: 16, shade: 0.01 });
							$.ajax({
								url: '/api/inter/thrOperateCompanyVps/toDelByList',
								data: {ids: ids},
								type: 'POST',
								async: true,
								success: function(res) {
									layer.close();
									location.reload();
									layer.msg(res.msg);
								}, error: function() {
									layer.close();
									layer.msg("删除失败，请稍后再试！", { icon: 2 });
								}
							});
						}, function() {
						});
					}
					break;
				}
			};
		},
		listenMenu10314: function(obj, datas) {// 运营公司表品牌信息
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl("运营公司表品牌信息 - 新增","/web/business/thrOperateCompanyBrand/toAdd",1);
					break;
				}
				case 'event-to-edit':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl("运营公司表品牌信息 - 编辑","/web/business/thrOperateCompanyBrand/toEdit?id="+ datas[0].id,1);
					}
					break;
				}
				case 'LAYTABLE_EXPORT_DATA'://导出
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/thrOperateCompanyBrand/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-del': {
					if (datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var ids = '';
						for(var i=0;i<datas.length;i++){
							if(ids==''){
								ids = datas[i].id;
							}else {
								ids = ids + ',' +datas[i].id;
							}
						}
						layer.confirm('确定要删除吗？', { icon: 3 }, function() {
							layer.msg('处理中', { icon: 16, shade: 0.01 });
							$.ajax({
								url: '/api/inter/thrOperateCompanyBrand/toDelByList',
								data: {ids: ids},
								type: 'POST',
								async: true,
								success: function(res) {
									layer.close();
									location.reload();
									layer.msg(res.msg);
								}, error: function() {
									layer.close();
									layer.msg("删除失败，请稍后再试！", { icon: 2 });
								}
							});
						}, function() {
						});
					}
					break;
				}
			};
		},



		listenMenu10315: function(obj, datas) {// 运营公司表欧洲贸易合规
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl("运营公司表欧洲贸易合规 - 新增","/web/business/thrOperateCompanyEuropeTrade/toAdd",1);
					break;
				}
				case 'event-to-edit':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl("运营公司表欧洲贸易合规 - 编辑","/web/business/thrOperateCompanyEuropeTrade/toEdit?id="+ datas[0].id,1);
					}
					break;
				}
				case 'LAYTABLE_EXPORT_DATA'://导出
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/thrOperateCompanyEuropeTrade/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-del': {
					if (datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var ids = '';
						for(var i=0;i<datas.length;i++){
							if(ids==''){
								ids = datas[i].id;
							}else {
								ids = ids + ',' +datas[i].id;
							}
						}
						layer.confirm('确定要删除吗？', { icon: 3 }, function() {
							layer.msg('处理中', { icon: 16, shade: 0.01 });
							$.ajax({
								url: '/api/inter/thrOperateCompanyEuropeTrade/toDelByList',
								data: {ids: ids},
								type: 'POST',
								async: true,
								success: function(res) {
									layer.close();
									location.reload();
									layer.msg(res.msg);
								}, error: function() {
									layer.close();
									layer.msg("删除失败，请稍后再试！", { icon: 2 });
								}
							});
						}, function() {
						});
					}
					break;
				}
			};
		},
		listenMenu10319: function(obj, datas) {//万里汇货币兑换单
			var t = this;
			switch(obj.event){
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwWanliCurrencyExchange/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-add':
				{
					t.openUrl("万里汇货币兑换单 - 新增","/web/finance/tcwWanliCurrencyExchange/toAdd",1);
					break;
				}
			};
		},

        listenMenu10317: function(obj, datas) {// 万里汇账号资金
            var t = this;
            switch(obj.event){
                case 'event-to-add':
                {
                    t.openUrl("万里汇账号资金 - 新增","/web/finance/tcwWanliFinance/toAdd",1);
                    break;
                }
                case 'event-to-edit':
                {
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl("万里汇账号资金 - 编辑","/web/finance/tcwWanliFinance/toEdit?id="+ datas[0].id,1);
					}
					break;
                }
                case 'LAYTABLE_EXPORT_DATA'://导出
                {
                    $.ajax({
                        type: "POST",
                        url: '/api/inter/tcwWanliFinance/export',
                        data: t.c.gridObj.getConds(2),
                        success: function (data) {
                            if (data.code == 0) {
                                if(data.msg != undefined && data.msg.startsWith('http')) {
                                    window.open(data.msg);
                                } else {
                                    layer.msg(data.msg);
                                }
                            } else {
                                alert(data.msg);
                            }
                        }
                    });
                    break;
                }
                case 'event-to-reconciliation'://资金对账
                {
					layer.confirm('确定要资金对账吗？', { icon: 3 }, function() {
						layer.msg('处理中', { icon: 16, shade: 0.01 });
						$.ajax({
							url: '/api/inter/tcwWanliFinance/reconciliation',
							data: t.c.gridObj.getConds(2),
							type: 'POST',
							async: true,
							success: function(res) {
								layer.close();
								location.reload();
								layer.msg(res.msg);
							}, error: function() {
								layer.close();
								layer.msg("资金对账失败，请稍后再试！", { icon: 2 });
							}
						});
					}, function() {
					});
                    break;
                }
            };
        },

		listenMenu10318: function(obj, datas) {// 万里汇账号交易流水
			var t = this;
			switch(obj.event){
				case 'event-to-export'://导出
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwAccountCountForWanli/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
		listenMenu10320: function(obj, datas) {// 万里汇提款单
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl("万里汇提款单 - 新增","/web/finance/tcwWanliDrawing/toAdd",1);
					break;
				}
				case 'event-to-export'://导出
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwWanliDrawing/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},

		listenMenu10321: function(obj, datas) { // VAT申报
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl("VAT申报 - 新增","/web/hr/thrVatApply/toAdd",1);
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/thrVatApply/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-cancel':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var row = datas[0];
						layui.layer.confirm("作废后不可恢复，确定作废？",{
							btn: ['确定', '取消']
						}, function (index) {
							$.ajax({
								type: "POST",
								url: '/api/inter/thrVatApply/cancel',
								data: {bid: row.bid},
								success: function (data) {
									if (data.code == 0) {
										layer.closeAll();
										layer.msg("作废成功!");
										setTimeout(function(){
											location.reload();
										}, 3000);
									} else {
										alert(data.msg);
									}
								}
							});
							layer.close(index);
						});
					}
					break;
				}
			};
		},
		listenMenu10322: function(obj, datas) {//预付款退回申请
			var t = this;
			switch(obj.event){
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwPaymentReturn/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-add':
					{
						t.openUrl("预付款退回申请 - 新增","/web/finance/tcwPaymentReturn/toAdd?",1);

						// layer.open({
						// shadeClose:true,
						// title: '选择预付款类型',
						// content: `
						// 	<form class="layui-form">
						// 	  <div class="layui-form-item">
						// 		<select id="paymentReturnType" lay-filter="aihao">
						// 			<option value="0" selected="">店铺回款</option>
						// 			<option value="1" >对公打款</option>
						// 		  </select>
						// 	  </div>
						// 	</form>
						// 	`,
						// success: function(layero, index) {
						// 	layui.form.render();
						// 	layero.find('.layui-layer-content').css('overflow', 'unset');
						// },
						// yes: function (index, layero) {
						// 	$(obj).on('click', window.top.menuItem);
						// 	t.openUrl("预付款退回申请 - 新增","/web/finance/tcwPaymentReturn/toAdd?paymentReturnType="+$('#paymentReturnType').val(),1);
						// 	layer.closeAll();
						// }
					// });
					break;
				}
				case 'LAYTABLE_EXPORT_DATA_DY':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						$.ajax({
							type: "POST",
							url: '/api/inter/tcwPaymentReturn/exportdy',
							data: "bid="+datas[0].bid,
							success: function (data) {
								if (data.code == 0) {
									if (data.msg != undefined && data.msg.startsWith('http')) {
										window.open(data.msg);
									} else {
										layer.msg(data.msg);
									}
								} else {
									alert(data.msg);
								}
							}
						});
					}
					break;
				}
				case 'event-to-cancel':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var row = datas[0];
						if (row.paymentReturnType == 1){
							return layer.alert('对公打款不允许作废!');
						}
						layui.layer.confirm("作废后不可恢复，确定作废？",{
							btn: ['确定', '取消']
						}, function (index) {
							$.ajax({
								type: "POST",
								url: '/api/inter/tcwPaymentReturn/cancel',
								data: {bid: row.bid,id: row.transparencyProgramId},
								success: function (data) {
									if (data.code == 0) {
										location.reload();
									} else {
										alert(data.msg);
									}
								}
							});
							layer.close(index);
						});
					}
					break;
				}
			};
		},

		listenMenu10323: function(obj, datas) { // 万里汇CNY付款单
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl("万里汇CNY付款单 - 新增","/web/finance/tcwWanliCnyPayment/toAdd",1);
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwWanliCnyPayment/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-exportdy':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						$.ajax({
							type: "POST",
							url: '/api/inter/tcwWanliCnyPayment/exportdy',
							data: "bid="+datas[0].bid,
							success: function (data) {
								if (data.code == 0) {
									if (data.msg != undefined && data.msg.startsWith('http')) {
										window.open(data.msg);
									} else {
										layer.msg(data.msg);
									}
								} else {
									alert(data.msg);
								}
							}
						});
					}
					break;
				}
			};
		},

		listenMenu10325: function(obj, datas) { // C88文件管理
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "C88文件管理-新增",
						content: '/web/storage/tccLogisticsSadFile/toAdd'
					});
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tccLogisticsSadFile/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-downLoadBatch'://批量下载文件
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					}  else {
						var choooseDatas = JSON.stringify(datas);

						layer.confirm('物流订单非特殊情况不能随意取消，请确认！', { icon: 3 }, function() {
							layer.msg('处理中', { icon: 16, shade: 0.01 });
							$.ajax({
								url: '/api/inter/tccLogisticsSadFile/downloadBacth',
								data: {'choooseDatas':choooseDatas},
								type: 'POST',
								async: true,
								success: function(res) {
									if (res.code == 0) {
										layer.closeAll();
										layer.alert(res.msg);
									} else {
										layer.closeAll();
										layer.alert(res.msg);
									}
								}, error: function() {
									layer.close();
									layer.msg("失败，请稍后再试！", { icon: 2 });
								}
							});
						}, function() {
						});
					}
					break;
				}
			};
		},


		listenMenu10326: function(obj, datas) {// 万里汇CNY计算汇率表
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl("万里汇CNY计算汇率表 - 新增","/web/finance/tcwWanliExchangeRate/toAdd",1);
					break;
				}
				case 'event-to-edit':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl("万里汇CNY计算汇率表 - 编辑","/web/finance/tcwWanliExchangeRate/toEdit?id="+ datas[0].id,1);
					}
					break;
				}
				case 'event-to-export'://导出
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwWanliExchangeRate/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-updateExchangeRate'://导入当日汇率
				{
					layer.open({
						shadeClose:true,
						title: '请选择汇率计算的时间区间',
						content: `
								<form class="layui-form">
								  <div class="layui-form-item">
									 <div class="layui-inline">
										  <label class="layui-form-label">日期范围</label>
										  <div class="layui-inline" id="ID-laydate-range">
											<div class="layui-input-inline">
											  <input type="text" autocomplete="off" id="ID-laydate-start-date" class="layui-input" placeholder="开始日期">
											</div>
											<div class="layui-form-mid">-</div>
											<div class="layui-input-inline">
											  <input type="text" autocomplete="off" id="ID-laydate-end-date" class="layui-input" placeholder="结束日期">
											</div>
										  </div>
										</div>
								  </div>
								</form>
							`,
						success: function(layero, index) {},
						yes: function (index, layero) {
							var countTimeStart = $('#ID-laydate-start-date').val();
							var countTimeEnd = $('#ID-laydate-end-date').val();
							if(countTimeStart==undefined || countTimeStart==null || countTimeStart==''){
								return  layer.alert('尚未选中开始日期');
							}
							if(countTimeEnd==undefined || countTimeEnd==null || countTimeEnd==''){
								return layer.alert('尚未选中结束日期');
							}
							layer.msg('处理中', {
								icon: 16,shade: 0.01
							});
							$.ajax({
								type: "POST",
								url: '/api/inter/tcwWanliExchangeRate/updateExchangeRate',
								data: {countTimeStart:countTimeStart,countTimeEnd:countTimeEnd},
								success: function (data) {
									if (data.code == 0) {
										layer.closeAll();
										layer.msg("导入成功");
										setTimeout(function(){
											location.reload();
										}, 3000);
									} else {
										layer.msg(data.msg);
									}
								},
								error: function () {
									layer.closeAll();
									layer.msg("导入失败，请稍后再试！", {icon: 2});
								}
							});
						}
					});
					break;
					/*
					layer.confirm('确定要导入当日汇率吗？', {icon: 3}, function () {
						layer.msg('处理中', {
							icon: 16,shade: 0.01
						});
						$.ajax({
							type: "POST",
							url: '/api/inter/tcwWanliExchangeRate/updateExchangeRate',
							data: {},
							success: function (data) {
								if (data.code == 0) {
									layer.closeAll();
									layer.msg("导入成功");
									setTimeout(function(){
										location.reload();
									}, 3000);
								} else {
									layer.msg(data.msg);
								}
							},
							error: function () {
								layer.closeAll();
								layer.msg("导入失败，请稍后再试！", {icon: 2});
							}
						});
					}, function () {});
					break;

					 */
				}
			};

			layui.use(function(){
				var nowTime=new Date();
				var laydate = layui.laydate;
				// 日期范围 - 左右面板联动选择模式
				laydate.render({
					elem: '#ID-laydate-range',
					range: ['#ID-laydate-start-date', '#ID-laydate-end-date'],
					max:0,
				});
			});

		},

		listenMenu10327: function(obj, datas) {//万里汇预付款退回
			var t = this;
			switch(obj.event){
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwWanliPaymentReturn/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-add':
				{
					t.openUrl("万里汇预付款退回 - 新增","/web/finance/tcwWanliPaymentReturn/toAdd",1);
					break;
				}
				case 'LAYTABLE_EXPORT_DATA_DY':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						$.ajax({
							type: "POST",
							url: '/api/inter/tcwWanliPaymentReturn/exportdy',
							data: "bid="+datas[0].bid,
							success: function (data) {
								if (data.code == 0) {
									if (data.msg != undefined && data.msg.startsWith('http')) {
										window.open(data.msg);
									} else {
										layer.msg(data.msg);
									}
								} else {
									alert(data.msg);
								}
							}
						});
					}
					break;
				}
			};
		},
		listenMenu10330: function(obj, datas) {//存款账户平台管理
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "新增",
						content: '/web/business/tbBaseInfo/toAdd'
					});
					break;
				}
				case 'event-to-edit':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w = ($(window).width() * 0.9);
						var h = ($(window).height() - 50);
						var index = layer.open({
							type: 2,
							area: [w + 'px', h + 'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade: 0.4,
							title: "编辑",
							content: '/web/business/tbBaseInfo/toEdit?id=' + datas[0].id
						});
					}
					break;
				}
				case 'LAYTABLE_EXPORT_DATA'://导出
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tbBaseInfo/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
		listenMenu10331: function(obj, datas) {
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl('万里汇补账单-新增',"/web/finance/tcwWanliSupplementary/toAdd",1);
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwWanliSupplementary/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
		listenMenu10332: function(obj, datas) {// 万里汇预付款入账单
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl("万里汇预付款入账单 - 新增","/web/finance/tcwWanliPrepaymentRecorded/toAdd",1);
					break;
				}
				case 'event-to-export'://导出
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwWanliPrepaymentRecorded/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},

		listenMenu10333: function(obj, datas) {//预付款归集明细
			var t = this;
			switch(obj.event){
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwWanliPrepaymentPooling/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-add':
				{
					layer.confirm('确定要新数据导入吗？', { icon: 3 }, function() {
						layer.msg('处理中', { icon: 16, shade: 0.01 });
						$.ajax({
							url: '/api/inter/tcwWanliPrepaymentPooling/add',
							data: t.c.gridObj.getConds(2),
							type: 'POST',
							async: true,
							success: function(res) {
								layer.close();
								location.reload();
								layer.msg(res.msg);
							}, error: function() {
								layer.close();
								layer.msg("新数据导入失败，请稍后再试！", { icon: 2 });
							}
						});
					}, function() {
					});
					break;
				}
				case 'event-to-tb':
				{
					if (datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var _list = [];
						for (var i = 0; i < datas.length; i++) {
							_list[i] = datas[i].id;
						}
						layer.confirm('确定要同步运营公司吗？', { icon: 3 }, function() {
							layer.msg('处理中', { icon: 16, shade: 0.01 });
							$.ajax({
								url: '/api/inter/tcwWanliPrepaymentPooling/tbVgsbm',
								data: "list=" + _list,
								type: 'POST',
								async: true,
								success: function(res) {
									layer.close();
									location.reload();
									layer.msg(res.msg);
								}, error: function() {
									layer.close();
									layer.msg("同步运营公司，请稍后再试！", { icon: 2 });
								}
							});
						}, function() {
						});
					}
					break;
				}
				case 'event-to-mid':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w = ($(window).width() * 0.9);
						var h = ($(window).height() - 50);
						var index = layer.open({
							type: 2, area: [w + 'px', h + 'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade: 0.4,
							title: "修改Mid",
							content: '/web/finance/tcwWanliPrepaymentPooling/toEdit?id=' + datas[0].id
						});
					}
					break;
				}
			};
		},

		listenMenu10334: function(obj, datas) { // 万里汇外币付款单
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					
					layer.open({
						shadeClose:true,
						title: '选择付款类型',
						content: `
							<form class="layui-form">
							  <div class="layui-form-item">
								<select id="id_select_payType" lay-filter="id_select_payType">
									<option value="1" selected="">透明计划</option>
									<option value="2">VAT</option>
									<option value="3">其他服务</option>
								  </select>
							  </div>
							</form>`,
						success: function(layero, index) {
							layui.form.render();
							layero.find('.layui-layer-content').css('overflow', 'unset');
						},
						yes: function (index, layero) {
							layer.closeAll();
							var payType = $('#id_select_payType').val();
							t.openUrl("万里汇外币付款单 - 新增","/web/finance/tcwWanliOtherPayment/toAdd?payType=" + payType, 1);
						}
					});
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwWanliOtherPayment/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-exportdy':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						$.ajax({
							type: "POST",
							url: '/api/inter/tcwWanliOtherPayment/exportdy',
							data: "bid="+datas[0].bid,
							success: function (data) {
								if (data.code == 0) {
									if (data.msg != undefined && data.msg.startsWith('http')) {
										window.open(data.msg);
									} else {
										layer.msg(data.msg);
									}
								} else {
									alert(data.msg);
								}
							}
						});
					}
					break;
				}
				// 批量修改费率
				case 'event-to-batchEditExchangeRate':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var bids = '';
						for(var i = 0 ;i < datas.length; i++){
							bids += '\'' + datas[i].bid + '\',';
						}
						var w=($(window).width()*0.9);
						var h=($(window).height() - 50);
					    var index = layer.open({
					        type: 2,
					        area: [w+'px', h +'px'],
					        fix: true,
					        maxmin: false,
					        shadeClose: true,
					        shade:0.4,
					        title: "批量修改计算汇率",
					        content: '/web/finance/tcwWanliOtherPayment/toBatchEditExchangeRate?bids=' + bids.substring(0, bids.length - 1)
					    });
					}
					break;
				}
				// 生成流水
				case 'event-to-generateRunning':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var bids = '';
						for(var i = 0 ;i < datas.length; i++){
							bids += datas[i].bid + ',';
						}
						layer.confirm('确定要生成流水吗？', { icon: 3 }, function() {
							layer.msg('处理中', { icon: 16, shade: 0.01 });
							$.ajax({
								url: '/api/inter/tcwWanliOtherPayment/generateRunning',
								data: {
									bids: bids.substring(0, bids.length - 1)
								},
								type: 'POST',
								async: true,
								success: function(res) {
									layer.msg(res.msg);
									setTimeout(function(){
										location.reload();
									}, 1000);
								}, error: function() {
									layer.close();
									layer.msg("删除失败，请稍后再试！", { icon: 2 });
								}
							});
						}, function() {
						});
					}
					break;
				}
			};
		},

		listenMenu10335: function(obj, datas) { // 万里汇预付款对账单
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl("万里汇预付款对账单 - 新增","/web/finance/tcwWanliReconciliation/toAdd", 1);
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwWanliReconciliation/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},

		listenMenu10337: function(obj, datas) {// 财务工资小计部门维护
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl("财务工资小计部门维护 - 新增","/web/finance/tcwFinanceSalaryClassify/toAdd",1);
					break;
				}
				case 'event-to-edit':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl("财务工资小计部门维护 - 编辑","/web/finance/tcwFinanceSalaryClassify/toEdit?id="+ datas[0].id,1);
					}
					break;
				}
			};
		},

		listenMenu10339: function(obj, datas) {// 财务工资表-小计表（内嵌不显示）
			var t = this;
			switch(obj.event){
				case 'event-to-classify':
				{
					t.openUrl("小计部门维护","/indexCommonOfMenu?menuId=10337",1);
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwFinanceSalaryTotal/exportByPaySlipTotal',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-count'://统计生成
				{
					layer.open({
						shadeClose:true,
						title: '选择月份',
						content: `
								<form class="layui-form">
								  <div class="layui-form-item">
									 <input type="text" class="layui-input" id="choose_month" placeholder="选择月份">
								  </div>
								</form>
							`,
						success: function(layero, index) {},
						yes: function (index, layero) {
							layer.msg('处理中', {
								icon: 16,shade: 0.01
							});
							var countMonth = $('#choose_month').val();
							$.ajax({
								type: "POST",
								url: '/api/inter/tcwFinanceSalaryTotal/updateTotalByCountMonth',
								data: {countMonth:countMonth},
								success: function (data) {
									if (data.code == 0) {
										layer.msg('成功！');
										setTimeout(function(){
											layer.closeAll();
											location.reload();
										}, 1000);
									} else {
										layer.msg(data.msg);
										layer.closeAll();
									}
								}
							});
						}
					});
					break;
				}
			};
			layui.use(function(){
				var laydate = layui.laydate;
				// 年月选择器
				laydate.render({
					elem: '#choose_month',
					type: 'month'
				});
			});
		},
		listenMenu10340: function(obj, datas) {// 财务工资表-汇总（内嵌不显示）
			var t = this;
			switch(obj.event) {
				case 'event-to-export': {
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwFinanceSalaryTotal/exportByPaySlipDetail',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if (data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			}
		},


		listenMenu10342: function(obj, datas) {// 财务社保表-汇总（内嵌不显示）
			var t = this;
			switch(obj.event) {
				case 'event-to-export': {
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwFinanceSalaryTotal/exportBySoseDetail',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if (data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			}
		},

		listenMenu10343: function(obj, datas) {// 财务社保表-小计表（内嵌不显示）
			var t = this;
			switch(obj.event){
				case 'event-to-classify':
				{
					t.openUrl("小计部门维护","/indexCommonOfMenu?menuId=10337",1);
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwFinanceSalaryTotal/exportBySoseTotal',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-count'://统计生成
				{
					layer.open({
						shadeClose:true,
						title: '选择月份',
						content: `
								<form class="layui-form">
								  <div class="layui-form-item">
									 <input type="text" class="layui-input" id="choose_month" placeholder="选择月份">
								  </div>
								</form>
							`,
						success: function(layero, index) {},
						yes: function (index, layero) {
							layer.msg('处理中', {
								icon: 16,shade: 0.01
							});
							var countMonth = $('#choose_month').val();
							$.ajax({
								type: "POST",
								url: '/api/inter/tcwFinanceSalaryTotal/updateTotalByCountMonth',
								data: {countMonth:countMonth},
								success: function (data) {
									if (data.code == 0) {
										layer.msg('成功！');
										setTimeout(function(){
											layer.closeAll();
											location.reload();
										}, 1000);
									} else {
										layer.msg(data.msg);
										layer.closeAll();
									}
								}
							});
						}
					});
					break;
				}
			};
			layui.use(function(){
				var laydate = layui.laydate;
				// 年月选择器
				laydate.render({
					elem: '#choose_month',
					type: 'month'
				});
			});
		},



		listenMenu10345: function(obj, datas) {// 财务医保表-汇总（内嵌不显示）
			var t = this;
			switch(obj.event) {
				case 'event-to-export': {
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwFinanceSalaryTotal/exportByMiDetail',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if (data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			}
		},

		listenMenu10346: function(obj, datas) {// 财务医保表-小计表（内嵌不显示）
			var t = this;
			switch(obj.event){
				case 'event-to-classify':
				{
					t.openUrl("小计部门维护","/indexCommonOfMenu?menuId=10337",1);
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwFinanceSalaryTotal/exportByMiTotal',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-count'://统计生成
				{
					layer.open({
						shadeClose:true,
						title: '选择月份',
						content: `
								<form class="layui-form">
								  <div class="layui-form-item">
									 <input type="text" class="layui-input" id="choose_month" placeholder="选择月份">
								  </div>
								</form>
							`,
						success: function(layero, index) {},
						yes: function (index, layero) {
							layer.msg('处理中', {
								icon: 16,shade: 0.01
							});
							var countMonth = $('#choose_month').val();
							$.ajax({
								type: "POST",
								url: '/api/inter/tcwFinanceSalaryTotal/updateTotalByCountMonth',
								data: {countMonth:countMonth},
								success: function (data) {
									if (data.code == 0) {
										layer.msg('成功！');
										setTimeout(function(){
											layer.closeAll();
											location.reload();
										}, 1000);
									} else {
										layer.msg(data.msg);
										layer.closeAll();
									}
								}
							});
						}
					});
					break;
				}
			};
			layui.use(function(){
				var laydate = layui.laydate;
				// 年月选择器
				laydate.render({
					elem: '#choose_month',
					type: 'month'
				});
			});
		},



		listenMenu10348: function(obj, datas) {// 财务公积金表-汇总（内嵌不显示）
			var t = this;
			switch(obj.event) {
				case 'event-to-export': {
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwFinanceSalaryTotal/exportByHousingDetail',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if (data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			}
		},

		listenMenu10349: function(obj, datas) {// 财务公积金表-小计表（内嵌不显示）
			var t = this;
			switch(obj.event){
				case 'event-to-classify':
				{
					t.openUrl("小计部门维护","/indexCommonOfMenu?menuId=10337",1);
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwFinanceSalaryTotal/exportByHousingTotal',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-count'://统计生成
				{
					layer.open({
						shadeClose:true,
						title: '选择月份',
						content: `
								<form class="layui-form">
								  <div class="layui-form-item">
									 <input type="text" class="layui-input" id="choose_month" placeholder="选择月份">
								  </div>
								</form>
							`,
						success: function(layero, index) {},
						yes: function (index, layero) {
							layer.msg('处理中', {
								icon: 16,shade: 0.01
							});
							var countMonth = $('#choose_month').val();
							$.ajax({
								type: "POST",
								url: '/api/inter/tcwFinanceSalaryTotal/updateTotalByCountMonth',
								data: {countMonth:countMonth},
								success: function (data) {
									if (data.code == 0) {
										layer.msg('成功！');
										setTimeout(function(){
											layer.closeAll();
											location.reload();
										}, 1000);
									} else {
										layer.msg(data.msg);
										layer.closeAll();
									}
								}
							});
						}
					});
					break;
				}
			};
			layui.use(function(){
				var laydate = layui.laydate;
				// 年月选择器
				laydate.render({
					elem: '#choose_month',
					type: 'month'
				});
			});
		},
		listenMenu10351: function(obj, datas) {// 数据库同步管理
			var t = this;
			switch(obj.event) {
				case 'event-to-syn': {
					layer.open({
						shadeClose:true,
						title: '选择同步类型',
						content: `
							<form class="layui-form">
							  <div class="layui-form-item">
								<select id="id_select_type" lay-filter="id_select_type">
									<option value="1" selected="">同步菜单</option>
									<option value="2">同步字段</option>
									<option value="3">同步按钮</option>
									<option value="4">同步子列表</option>
									<option value="5">同步子列表字段</option>
									<option value="6">同步子列表按钮</option>
									<option value="7">同步弹出框</option>
									<option value="8">同步弹出框字段</option>
									<option value="9">同步流程-模型</option>
									<option value="10">同步流程-定义</option>
									<option value="11">同步流程-连接线</option>
									<option value="12">同步流程-节点</option>
									<option value="13">同步流程-部署</option>
									<option value="14">同步数据字典</option>
									<option value="15">同步行单击字段</option>
								  </select>
							  </div>
							</form>`,
						success: function(layero, index) {
							layui.form.render();
							layero.find('.layui-layer-content').css('overflow', 'unset');
						},
						yes: function (index, layero) {
							var type = $('#id_select_type').val();
							layer.confirm('确定要同步吗？', { icon: 3 }, function() {
								layer.msg('处理中', { icon: 16, shade: 0.01 });
								$.ajax({
									type: "POST",
									url: '/api/inter/ysSynLog/syn',
									data: {
										type: type
									},
									success: function (data) {
										if (data.code == 0) {
											layer.msg(data.msg);
										} else {
											layer.msg(data.msg);
										}
									}
								});
							}, function() {
							});
						}
					});
					break;
				}
				case 'event-to-syn-col': {
					layer.confirm('确定要同步吗？', { icon: 3 }, function() {
						layer.msg('处理中', { icon: 16, shade: 0.01 });
						$.ajax({
							type: "POST",
							url: '/api/inter/ysSynLog/synCol',
							data: {},
							success: function (data) {
								if (data.code == 0) {
									layer.msg(data.msg);
								} else {
									layer.msg(data.msg);
								}
							}
						});
					}, function() {
					});
					break;
				}
				case 'event-to-syn-button': {
					layer.confirm('确定要同步吗？', { icon: 3 }, function() {
						layer.msg('处理中', { icon: 16, shade: 0.01 });
						$.ajax({
							type: "POST",
							url: '/api/inter/ysSynLog/synButton',
							data: {},
							success: function (data) {
								if (data.code == 0) {
									layer.msg(data.msg);
								} else {
									layer.msg(data.msg);
								}
							}
						});
					}, function() {
					});
					break;
				}
			}
		},

		listenMenu10352: function(obj, datas) { // 职能费用申请
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl("职能费用申请 - 新增","/web/finance/tcwRoleCostApply/toAdd", 1);
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwRoleCostApply/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-exportdy':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						$.ajax({
							type: "POST",
							url: '/api/inter/tcwRoleCostApply/exportdy',
							data: {bid:datas[0].bid},
							success: function (data) {
								if (data.code == 0) {
									if (data.msg != undefined && data.msg.startsWith('http')) {
										window.open(data.msg);
									} else {
										layer.msg(data.msg);
									}
								} else {
									alert(data.msg);
								}
							}
						});
					}
					break;
				}
				case 'event-to-import'://主表信息导入
				{
					t.openImport(10352); // 导入的菜单ID
					break;
				}
			};
		},

		listenMenu10353: function(obj, datas) { // 付款申请单
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl("付款申请单 - 新增","/web/finance/tcwPaymentApply/toAdd", 1);
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwPaymentApply/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-exportdy':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						$.ajax({
							type: "POST",
							url: '/api/inter/tcwPaymentApply/exportdy',
							data: {bid:datas[0].bid},
							success: function (data) {
								if (data.code == 0) {
									if (data.msg != undefined && data.msg.startsWith('http')) {
										window.open(data.msg);
									} else {
										layer.msg(data.msg);
									}
								} else {
									alert(data.msg);
								}
							}
						});
					}
					break;
				}
				case 'event-to-import'://主表信息导入
				{
					t.openImport(10353); // 导入的菜单ID
					break;
				}
			};
		},


		listenMenu10354: function(obj, datas) { // 财务交易流水
			var t = this;
			switch(obj.event){
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwFinancialTransactionFlow/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
		listenMenu10356: function(obj, datas) {
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl('财务交易类型-新增',"/web/finance/tcwFinancialTransactionType/toAdd",1);
					break;
				}
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwFinancialTransactionType/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-edit':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl("财务交易类型 - 编辑","/web/finance/tcwFinancialTransactionType/toEdit?id="+ datas[0].id,1);
					}
					break;
				}
			};
		},
		listenMenu10358: function(obj, datas) {//公司银行账户实时资金管理
			var t = this;
			switch(obj.event){

				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tbCompanyBankInfoAccount/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
	    listenMenu10359: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-add': {
					var w = ($(window).width() * 0.9);
					var h = ($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w + 'px', h + 'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade: 0.4,
						title: "新增",
						content: '/web/sys/toaNotice/toAdd'
					});
					break;
				}
				case 'event-to-edit': {
					if (datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if (datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w = ($(window).width() * 0.9);
						var h = ($(window).height() - 50);
						var index = layer.open({
							type: 2, area: [w + 'px', h + 'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade: 0.4,
							title: "修改",
							content: '/web/sys/toaNotice/toEdit?id=' + datas[0].id
						});
					}
					break; 
				}
			};
	    },

		listenMenu10360: function(obj, datas) {
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl('费用划拨单-新增',"/web/finance/tcwExpenseAllocation/toAdd",1);
					break;
				}
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwExpenseAllocation/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-import'://主表信息导入
				{
					t.openImport(10360); // 导入的菜单ID
					break;
				}
			};
		},

		listenMenu10361: function(obj, datas) {
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl('费用结算单-新增',"/web/finance/tcwExpenseSettlement/toAdd",1);
					break;
				}
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwExpenseSettlement/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-import'://主表信息导入
				{
					t.openImport(10361); // 导入的菜单ID
					break;
				}
			};
		},

		listenMenu10362: function(obj, datas) { // 费用结算返还单
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl("费用结算返还单 - 新增","/web/finance/tcwExpenseSettleReturn/toAdd", 1);
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwExpenseSettleReturn/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},

		listenMenu10363: function(obj, datas) { // 运营公司预付款管理
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl('运营公司预付款管理-新增',"/web/finance/tcwOperateCompanyPrepayment/toAdd",1);
					break;
				}
				case 'event-to-edit'://编辑
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl('运营公司预付款管理 - 编辑', '/web/finance/tcwOperateCompanyPrepayment/toEdit?id=' + datas[0].id, 1);
					}
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwOperateCompanyPrepayment/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
		listenMenu10364: function(obj, datas) { // 运营电子发票开票单
			var t = this;
			switch(obj.event){
				case 'event-to-import'://主表信息导入
				{
					t.openImport(10364); // 导入的菜单ID
					break;
				}
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwElectronicInvoice/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},

		listenMenu10365: function(obj, datas) { // 运营形式发票开票单
			var t = this;
			switch(obj.event){
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwProformaInvoice/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'LAYTABLE_EXPORT_DATA_DYXS':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						$.ajax({
							type: "POST",
							url: '/api/inter/tcwProformaInvoice/exportdyxs',
							data: "bid="+datas[0].bid,
							success: function (data) {
								if (data.code == 0) {
									if (data.msg != undefined && data.msg.startsWith('http')) {
										window.open(data.msg);
									} else {
										layer.msg(data.msg);
									}
								} else {
									alert(data.msg);
								}
							}
						});
					}
					break;
				}
				case 'LAYTABLE_EXPORT_DATA_DYFW':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						$.ajax({
							type: "POST",
							url: '/api/inter/tcwProformaInvoice/exportdyfw',
							data: "bid="+datas[0].bid,
							success: function (data) {
								if (data.code == 0) {
									if (data.msg != undefined && data.msg.startsWith('http')) {
										window.open(data.msg);
									} else {
										layer.msg(data.msg);
									}
								} else {
									alert(data.msg);
								}
							}
						});
					}
					break;
				}
			};
		},

		listenMenu10368: function(obj, datas) {// 采购合同单
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl("采购合同单 - 新增","/web/purchase/tcgPurchaseContract/toAdd",1);
					break;
				}
				case 'event-to-export'://导出
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcgPurchaseContract/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
		listenMenu10369: function(obj, datas) {// 预约采购管理
			var t = this;
			switch(obj.event){
				case 'event-to-cancel':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						layer.confirm('确定要取消吗？', { icon: 3 }, function() {
							layer.msg('处理中', { icon: 16, shade: 0.01 });
							$.ajax({
								url: '/api/inter/tcgPurchaseAppointOrderManage/cancel',
								data: {
									bid: datas[0].bid
								},
								type: 'POST',
								async: true,
								success: function(res) {
									layer.msg(res.msg);
									if (res.code == 0) {
										layer.close();
										location.reload();
									}
								}, error: function() {
									layer.close();
									layer.msg("删除失败，请稍后再试！", { icon: 2 });
								}
							});
						}, function() {
						});
					}
					break;
				}
				case 'event-to-export'://导出
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcgPurchaseAppointOrderManage/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
		listenMenu10370: function(obj, datas) {// 预约采购单
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl('预约采购单-新增',"/web/purchase/tcgPurchaseAppointOrder/toAdd",1);
					break;
				}
				case 'event-to-export'://导出
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcgPurchaseAppointOrder/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
		listenMenu10371: function(obj, datas) {// 采购预入库
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl("采购预入库 - 新增","/web/purchase/tcgPurchasePreStorage/toAdd",1);
					break;
				}
				case 'event-to-export'://导出
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcgPurchasePreStorage/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},

		listenMenu10373: function(obj, datas) { // 万里汇外币付款单
			var t = this;
			switch(obj.event){
				// 生成质检上架单
				case 'event-to-up':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var bids = '';
						for(var i = 0 ;i < datas.length; i++){
							bids += datas[i].bid + ',';
						}
						layer.confirm('确定要生成质检上架单？', { icon: 3 }, function() {
							layer.msg('处理中', { icon: 16, shade: 0.01 });
							$.ajax({
								url: '/api/inter/tccAssemble/batchPass',
								data: {
									bids: bids.substring(0, bids.length - 1)
								},
								type: 'POST',
								async: true,
								success: function(res) {
									layer.msg(res.msg);
									setTimeout(function(){
										location.reload();
									}, 1000);
								}, error: function() {
									layer.close();
									layer.msg("操作失败，请稍后再试！", { icon: 2 });
								}
							});
						}, function() {
						});
					}
					break;
				}
				case 'event-to-exception': {
					if (datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if (datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w = ($(window).width() * 0.9);
						var h = ($(window).height() - 50);
						var index = layer.open({
							type: 2, area: [w + 'px', h + 'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade: 0.4,
							title: "异常组装",
							content: '/web/storage/tccAssemble/toError?bid=' + datas[0].bid
						});
					}
					break; 
				}
			};
		},

		listenMenu10374: function(obj, datas) {// 采购合同管理
			var t = this;
			switch(obj.event) {
				case 'event-to-cancel': {//采购取消
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var subPaymentNum = datas[0].subPaymentNum;
						var subWarehousingNum = datas[0].subWarehousingNum;
						var subWriteOffNum = datas[0].subWriteOffNum;
						if(subPaymentNum != 0 ||  subWarehousingNum!=0 || subWriteOffNum!=0){
							return layer.msg("子件存在付款数量、入库数量、核销数量不允许取消");
						}
						layer.confirm('确定要取消吗？', { icon: 3 }, function() {
							layer.msg('处理中', { icon: 16, shade: 0.01 });
							$.ajax({
								url: '/api/inter/tcgPurchaseContractByManage/cancelInfo',
								data: {
									itemId: datas[0].itemId,
									bid: datas[0].bid
								},
								type: 'POST',
								async: true,
								success: function(res) {
									if (res.code == 0) {
										layer.msg('成功！');
										setTimeout(function(){
											layer.closeAll();
											location.reload();
										}, 3000);
									} else {
										layer.msg(res.msg);
										layer.closeAll();
									}
								}, error: function() {
									layer.close();
									layer.msg("操作失败，请稍后再试！", { icon: 2 });
								}
							});
						}, function() {
						});
					}
					break;
				}
				case 'event-to-export': {
					$.ajax({
						type: "POST",
						url: '/api/inter/tcgPurchaseContractByManage/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if (data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			}
		},


		listenMenu10375: function(obj, datas) {// 组装报错单
			var t = this;
			switch(obj.event) {
				case 'event-to-export': {//导出
					$.ajax({
						type: "POST",
						url: '/api/inter/tccAssembleError/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if (data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}

				case 'event-to-errorHandle': {//报错处理
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var choooseDatas = JSON.stringify(datas);
						//处理状态（0未处理、1不处理、2补发货、3已发货）
						layer.alert('请选择报错处理的方式', {
							btn: ['不处理', '补发货'],
							btnAlign: 'c', // 按钮居中显示
							btn1: function(){//不处理
								layer.confirm('确定要将所选的报错单处理成\"不处理\"吗？', { icon: 3 }, function() {
									layer.msg('处理中', { icon: 16, shade: 0.01 });
									$.ajax({
										url: '/api/inter/tccAssembleError/errorHandle',
										data: {
											choooseDatas: choooseDatas,
											handleStatus:1
										},
										type: 'POST',
										async: true,
										success: function(res) {
											if (res.code == 0) {
												layer.msg(res.msg);
												setTimeout(function(){
													layer.closeAll();
													location.reload();
												}, 3000);
											} else {
												layer.msg(res.msg);
												layer.closeAll();
											}
										}, error: function() {
											layer.close();
											layer.msg("操作失败，请稍后再试！", { icon: 2 });
										}
									});
								}, function() {});
							},
							btn2: function(){//补发货
								layer.confirm('确定要将所选的报错单处理成\"补发货\"吗？', { icon: 3 }, function() {
									layer.msg('处理中', { icon: 16, shade: 0.01 });
									$.ajax({
										url: '/api/inter/tccAssembleError/errorHandle',
										data: {
											choooseDatas: choooseDatas,
											handleStatus:2
										},
										type: 'POST',
										async: true,
										success: function(res) {
											if (res.code == 0) {
												layer.msg(res.msg);
												setTimeout(function(){
													layer.closeAll();
													location.reload();
												}, 3000);
											} else {
												layer.msg(res.msg);
												layer.closeAll();
											}
										}, error: function() {
											layer.close();
											layer.msg("操作失败，请稍后再试！", { icon: 2 });
										}
									});
								}, function() {});
							}
						});
					}
					break;
				}

				case 'event-to-preStorage'://预入库
				{
					if(datas.length == 0) {
						return layer.alert('尚未选中数据');
					}
					var choooseDatas = JSON.stringify(datas);
					var w = ($(window).width() * 0.7);
					var h = ($(window).height() - 50);
					layer.open({
						shadeClose:true,
						area: [w + 'px', h + 'px'],
						title: '预入库',
						content: `
								<form class="layui-form">
								  <div class="layui-form-item">
								  	 <label class="layui-form-label">预计入库时间</label>
    								 <div class="layui-input-block">
									 	<input type="text" class="layui-input" lay-verify="required" id="choose_date" placeholder="选择预计入库时间">
									 </div>
								  </div>
								  <div class="layui-form-item">
									<label class="layui-form-label">物流方式</label>
									<div class="layui-input-block">
									  <input type="text" name="logisticsMode" id="logisticsMode" lay-verify="required" placeholder="请输入物流方式" class="layui-input">
									</div>
								  </div>
								  <div class="layui-form-item">
									<label class="layui-form-label">物流编码</label>
									<div class="layui-input-block">
									  <input type="text" name="trackingNumber" id="trackingNumber" lay-verify="required" placeholder="请输入物流编码" class="layui-input">
									</div>
								  </div>
								</form>
							`,
						success: function(layero, index) {},
						yes: function (index, layero) {
							layer.msg('处理中', {
								icon: 16,shade: 0.01
							});
							var estimatedArrivalTime = $('#choose_date').val();
							var logisticsMode = $('#logisticsMode').val();
							var trackingNumber = $('#trackingNumber').val();
							$.ajax({
								type: "POST",
								url: '/api/inter/tccAssembleError/preStorage',
								data: {
									choooseDatas: choooseDatas,
									estimatedArrivalTime:estimatedArrivalTime,
									logisticsMode:logisticsMode,
									trackingNumber:trackingNumber
								},
								success: function (data) {
									if (data.code == 0) {
										layer.msg(data.msg);
										setTimeout(function(){
											layer.closeAll();
											location.reload();
										}, 3000);
									} else {
										layer.msg(data.msg);
										layer.closeAll();
									}
								}
							});
						}
					});
					break;
				}
			};

			layui.use(function(){
				var laydate = layui.laydate;
				// 日期选择器
				laydate.render({
					elem: '#choose_date',
					//type: 'month'
				});
			});
		},
		listenMenu10376: function(obj, datas) {// 采购入库
			var t = this;
			switch(obj.event){

				case 'event-to-export'://导出
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcgPurchaseInStorage/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-rk'://采购入库
				{
					if(datas.length == 0) {
						return layer.alert('尚未选中数据');
					}
					var choooseDatas = JSON.stringify(datas);
					var infoItems=JSON.parse(choooseDatas);
					if (infoItems.some(item => item.storageStatus == 1)) {
						layer.msg("只允许操作待入库数据,请核实后在操作!");
						return;
					}
					window.matchValuesAfterModalSelectRadio = function(colCode, data, extraData) {
						var listId = [];
						for (var i = 0; i < datas.length; i++) {
							listId.push(datas[i].id)
						}
						layui.layer.msg('处理中', {
							icon: 16,
							shade: 0.01
						});
						$.ajax({
							url: '/api/inter/tcgPurchaseInStorage/updateRk',
							data: {listId:JSON.stringify(listId),chw:data.chw},
							type: 'POST',
							async: false,
							success: function (result) {
								if(result.code=='0'){
									layer.close();
									//刷新列表
									setTimeout(function(){
										location.reload();
									}, 1000);
									//return;
								}else {//失败
									layer.close();
									layer.msg(result.msg, {icon: 2});
								}
							},
							error: function () {
								layer.close();
								layer.msg("采购入库失败，请稍后再试！", {icon: 2});
							}
						});
					};
					layui.YsModal.init({modalKey: 'TCC_LocationRk', colCode: 'aaaa', parentObj: window});
					break;
				}
				case 'event-to-sh'://入库审核
				{
					if(datas.length == 0) {
						return layer.alert('尚未选中数据');
					}
					var choooseDatas = JSON.stringify(datas);
					var infoItems=JSON.parse(choooseDatas);
					if (infoItems.some(item => item.chw == null || item.chw == '')) {
						layer.msg("只允许操作已选择货位的数据,请核实后在操作!");
						return;
					}
					layer.confirm('确定要入库审核吗？', { icon: 3 }, function() {
						layer.msg('处理中', { icon: 16, shade: 0.01 });
						var listId = [];
						for (var i = 0; i < datas.length; i++) {
							listId.push(datas[i].id)
						}
						$.ajax({
							url: '/api/inter/tcgPurchaseInStorage/updateSh',
							data: {listId:JSON.stringify(listId)},
							type: 'POST',
							async: true,
							success: function(res) {
								layer.close();
								location.reload();
								layer.msg(res.msg);
							}, error: function() {
								layer.close();
								layer.msg("入库审核失败，请稍后再试！", { icon: 2 });
							}
						});
					}, function() {
					});
					break;
				}
			};
		},


		listenMenu10377: function(obj, datas) {// 质检上架
			var t = this;
			switch(obj.event) {
				case 'event-to-export': {//导出
					$.ajax({
						type: "POST",
						url: '/api/inter/tccPuton/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if (data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}

				case 'event-to-doQualityTesting': {//质检上架
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var choooseDatas = JSON.stringify(datas);
						layer.confirm('确定要质检上架所选的单据吗？', { icon: 3 }, function() {
							window.matchValuesAfterModalSelectRadio = function(colCode, data, extraData) {
								console.log('data =',data);
								layer.msg('处理中', { icon: 16, shade: 0.01 });
								$.ajax({
									url: '/api/inter/tccPuton/doQualityTesting',
									data: {
										choooseDatas: choooseDatas,
										chw:data.chw
									},
									type: 'POST',
									async: true,
									success: function(res) {
										if (res.code == 0) {
											layer.msg(res.msg);
											setTimeout(function(){
												layer.closeAll();
												location.reload();
											}, 3000);
										} else {
											layer.msg(res.msg);
											layer.closeAll();
										}
									}, error: function() {
										layer.close();
										layer.msg("操作失败，请稍后再试！", { icon: 2 });
									}
								});
							};
							layui.YsModal.init({modalKey: 'TCC_Location', colCode: 'aaaa', parentObj: window});

						}, function() {});
					}
					break;
				}

				case 'event-to-putonExamine'://上架审核
				{
					if(datas.length == 0) {
						return layer.alert('尚未选中数据');
					}
					var choooseDatas = JSON.stringify(datas);
					layer.confirm('确定要上架审核所选的单据吗？', { icon: 3 }, function() {
						layer.msg('处理中', { icon: 16, shade: 0.01 });
						$.ajax({
							type: "POST",
							url: '/api/inter/tccPuton/putonExamine',
							data: {
								choooseDatas: choooseDatas
							},
							success: function (data) {
								if (data.code == 0) {
									layer.msg(data.msg);
									setTimeout(function(){
										layer.closeAll();
										location.reload();
									}, 3000);
								} else {
									layer.msg(data.msg);
									layer.closeAll();
								}
							}, error: function() {
								layer.close();
								layer.msg("操作失败，请稍后再试！", { icon: 2 });
							}
						});
					}, function() {});
					break;
				}
			};
		},

		listenMenu10382: function(obj, datas) {//库存管理
			var t = this;
			switch(obj.event){
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tccStockControl/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}

			};
		},
		
		listenMenu10383: function(obj, datas) {//仓库管理
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "新增",
						content: '/web/storage/tccWarehouse/toAdd'
					});
					break;
				}
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tccWarehouse/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-edit'://编辑
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl('仓库管理 - 编辑', '/web/storage/tccWarehouse/toEdit?id=' + datas[0].id, 1);
					}
					break;
				}
			};
		},

		listenMenu10384: function(obj, datas) {//库区管理
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "新增",
						content: '/web/storage/tccWarehouseArea/toAdd'
					});
					break;
				}
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tccWarehouseArea/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-edit'://编辑
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl('库区管理 - 编辑', '/web/storage/tccWarehouseArea/toEdit?id=' + datas[0].id, 1);
					}
					break;
				}
			};
		},
		listenMenu10386: function(obj, datas) {//货位管理
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "新增",
						content: '/web/storage/tccLocation/toAdd'
					});
					break;
				}
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tccLocation/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-edit'://编辑
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl('货位管理 - 编辑', '/web/storage/tccLocation/toEdit?id=' + datas[0].id, 1);
					}
					break;
				}
			};
		},
		listenMenu10387: function(obj, datas) {// 采购付款单
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl("采购付款单 - 新增","/web/purchase/tcgPurchasePayment/toAdd",1);
					break;
				}
				case 'event-to-export'://导出
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcgPurchasePayment/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-cgtk'://采购退款
				{
					if(datas.length == 0) {
						return layer.alert('尚未选中数据');
					}else if(datas.length > 1) {
						return layer.alert('只能选中一行数据');
					}
					if (datas.some(item => item.effectStock != 1)) {
						layer.msg("只允许操作已审核数据,请核实后在操作!");
						return;
					}
					var dataGet = datas[0];
					layer.confirm('确定要采购退款所选的单据吗？', { icon: 3 }, function() {
						window.matchValuesAfterModalSelectRadio = function (colCode, data, extraData) {
							layer.msg('处理中', {icon: 16, shade: 0.01});
							$.ajax({
								url: '/api/inter/tcgPurchasePayment/cgtk',
								data: {
									id: dataGet.id,
									capitalClaimSonId:data.capitalClaimSonId
								},
								type: 'POST',
								async: true,
								success: function (res) {
									if (res.code == 0) {
										layer.msg(res.msg);
										setTimeout(function () {
											layer.closeAll();
											location.reload();
										}, 3000);
									} else {
										layer.msg(res.msg);
									}
								}, error: function () {
									layer.close();
									layer.msg("操作失败，请稍后再试！", {icon: 2});
								}
							});
						};
						var par = "purchasePaymentId="+ dataGet.id;//采购付款单id
						layui.YsModal.init({modalKey: 'TCW_CapitalClaimCg', colCode: 'vyhzhmc', parentObj: window,conditionsDefault: [{code: 'claimVgsbm', value:"GS0607"}], pathGridRequest: '/api/inter/tcwCapitalClaim/tcwCapitalClaimCg?'+par});
					});
					break;
				}
			};
		},


		listenMenu10385: function(obj, datas) {// 发票预核销单
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl("发票预核销单 - 新增","/web/purchase/tcgInvoiceOffset/toAdd",1);
					break;
				}
				case 'event-to-export'://导出
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcgInvoiceOffset/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
		listenMenu10388: function(obj, datas) {// 发票登记单
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl("发票登记单 - 新增","/web/purchase/tcgInvoiceRegist/toAdd",1);
					break;
				}
				case 'event-to-export'://导出
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcgInvoiceRegist/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},

		listenMenu10389: function(obj, datas) {// 发票管理
			var t = this;
			switch(obj.event) {
				case 'event-to-cancel': {//登记取消
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var customsNum = datas[0].customsNum;
						if(customsNum != 0 ){
							return layer.msg("存在报关数量不允许取消");
						}
						layer.confirm('确定要取消吗？', { icon: 3 }, function() {
							layer.msg('处理中', { icon: 16, shade: 0.01 });
							$.ajax({
								url: '/api/inter/tcgInvoiceOffsetByManage/cancelInfo',
								data: {
									id: datas[0].id
								},
								type: 'POST',
								async: true,
								success: function(res) {
									if (res.code == 0) {
										layer.msg(res.msg);
										setTimeout(function(){
											layer.closeAll();
											location.reload();
										}, 3000);
									} else {
										layer.msg(res.msg);
										layer.closeAll();
									}
								}, error: function() {
									layer.close();
									layer.msg("操作失败，请稍后再试！", { icon: 2 });
								}
							});
						}, function() {
						});
					}
					break;
				}
				case 'event-to-export': {
					$.ajax({
						type: "POST",
						url: '/api/inter/tcgInvoiceOffsetByManage/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if (data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			}
		},
		listenMenu10390: function(obj, datas) {
			var t = this;
			//t.gridObj.getConds();
			switch(obj.event){

				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tccStockControlRunning/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
		listenMenu10391: function(obj, datas) {// 亚马逊仓库地址管理
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl("亚马逊仓库地址管理 - 新增","/web/logistics/tpAmazonAddress/toAdd",1);
					break;
				}
				case 'event-to-edit'://编辑
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w=($(window).width()*0.9);
						var h=($(window).height() - 50);
						var index = layer.open({
							type: 2,
							area: [w+'px', h +'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade:0.4,
							title: "编辑",
							content: '/web/logistics/tpAmazonAddress/toEdit?id=' + datas[0].id
						});
					}
					break;
				}
				case 'event-to-export'://导出
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tpAmazonAddress/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-print'://亚马逊仓库地址管理材料打印
				{

					break;
				}
			};
		},


		listenMenu10392: function(obj, datas) {// 报关单
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl("报关单 - 新增","/web/logistics/tlCustomsDeclaration/toAdd",1);
					break;
				}
				case 'event-to-export'://导出
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tlCustomsDeclaration/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-print'://报关单材料打印
				{

					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						layer.msg('处理中', { icon: 16, shade: 0.01 });
						$.ajax({
							url: '/api/inter/tlCustomsDeclaration/doPrint',
							data: {
								bid: datas[0].bid
							},
							type: 'POST',
							async: true,
							success: function(res) {
								if (res.code == 0) {
									layer.closeAll();
									if(res.msg != undefined && res.msg.startsWith('http')) {
										window.open(res.msg);
									} else {
										layer.msg(res.msg);
									}
									/*
									layer.msg(res.msg);
									setTimeout(function(){
										layer.closeAll();
										location.reload();
									}, 3000);
									 */
								} else {
									layer.msg(res.msg);
									layer.closeAll();
								}
							}, error: function() {
								layer.close();
								layer.msg("操作失败，请稍后再试！", { icon: 2 });
							}
						});
					}
					break;
				}
			};
		},
		listenMenu10394: function(obj, datas) {
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl('管理交易类型-新增',"/web/finance/tcwManageTransact/toAdd",1);
					break;
				}
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwManageTransact/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-edit':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl("管理交易类型 - 编辑","/web/finance/tcwManageTransact/toEdit?id="+ datas[0].id,1);
					}
					break;
				}
			};
		},
		listenMenu10395: function(obj, datas) {
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl('公司账户资金转账-新增',"/web/finance/tcwCompanyAccountTransfer/toAdd",1);
					break;
				}
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwCompanyAccountTransfer/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-exportdy':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						$.ajax({
							type: "POST",
							url: '/api/inter/tcwCompanyAccountTransfer/exportdy',
							data: {bid:datas[0].bid},
							success: function (data) {
								if (data.code == 0) {
									if (data.msg != undefined && data.msg.startsWith('http')) {
										window.open(data.msg);
									} else {
										layer.msg(data.msg);
									}
								} else {
									alert(data.msg);
								}
							}
						});
					}
					break;
				}
			};
		},
		listenMenu10403: function(obj, datas) {
			var t = this;
			switch(obj.event){
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcgDistribution/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-sku'://SKU维护
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w=($(window).width()*0.9);
						var h=($(window).height() - 50);
						var index = layer.open({
							type: 2,
							area: [w+'px', h +'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade:0.4,
							title: '修改1688铺货信息',
							content: '/web/purchase/tcgDistribution/toEdit?id='+ datas[0].id
						});
					}
					break;

				}
				case 'event-to-zj'://子件信息维护
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						window.matchValuesAfterModalSelectRadio = function(colCode, data, extraData) {
							layui.layer.msg('处理中', {
								icon: 16,
								shade: 0.01
							});
							$.ajax({
								url: '/api/inter/tcgDistribution/editZj',
								data: {id:datas[0].id,scode:data.code,sname:data.name},
								type: 'POST',
								async: false,
								success: function (result) {
									if(result.code=='0'){
										layer.close();
										//刷新列表
										setTimeout(function(){
											location.reload();
										}, 1000);
										//return;
									}else {//失败
										layer.close();
										layer.msg(result.msg, {icon: 2});
									}
								},
								error: function () {
									layer.close();
									layer.msg("新增失败，请稍后再试！", {icon: 2});
								}
							});
						};
						var par = "pcode="+ datas[0].pcode;//商品编码
						layui.YsModal.init({modalKey: 'TP_ProductActiveComponentPh', colCode: 'aaaa', parentObj: window, pathGridRequest: '/api/inter/tpProductActiveComponent/searchPh?'+par});
					}
					break;
				}
				case 'event-to-account'://1688账户
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: '1688账户',
						content: '/web/sys/tsApi1688ToKen/toAccount?'
					});
					break;
				}
			};
		},


		listenMenu10402: function(obj, datas) {//采购计划
			var t = this;
			var tableId = t.c.id_table_main;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl('采购计划-新增',"/web/purchase/tcgPurchaseByPlan/toAdd",1);
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcgPurchaseByPlan/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-produceOrder'://生成订单、审核按钮
				{
					if(datas.length == 0) {
						return layer.alert('尚未选中数据');
					}
					var choooseDatas = JSON.stringify(datas);
					layer.confirm('确定要审核所选择的采购计划吗？', { icon: 3 }, function() {
						layer.msg('处理中', { icon: 16, shade: 0.01 });
						$.ajax({
							type: "POST",
							url: '/api/inter/tcgPurchaseByPlan/produceOrder',
							data: {
								choooseDatas: choooseDatas
							},
							success: function (data) {
								layer.closeAll();
								if (data.code == 0) {
									layui.table.reloadData(tableId);
									layer.alert(data.msg);
								} else {
									layer.msg(data.msg);
								}
							}, error: function() {
								layer.close();
								layer.msg("操作失败，请稍后再试！", { icon: 2 });
							}
						});
					}, function() {});
					break;
				}

				case 'event-to-cancel'://取消确认
				{
					if(datas.length == 0) {
						return layer.alert('尚未选中数据');
					}
					var choooseDatas = JSON.stringify(datas);
					layer.confirm('确定要取消所选择的采购计划吗？', { icon: 3 }, function() {
						layer.msg('处理中', { icon: 16, shade: 0.01 });
						$.ajax({
							type: "POST",
							url: '/api/inter/tcgPurchaseByPlan/cancel',
							data: {
								choooseDatas: choooseDatas
							},
							success: function (data) {
								layer.closeAll();
								if (data.code == 0) {
									layui.table.reloadData(tableId);
									layer.alert(data.msg);
								} else {
									layer.msg(data.msg);
								}
							}, error: function() {
								layer.close();
								layer.msg("操作失败，请稍后再试！", { icon: 2 });
							}
						});
					}, function() {});
					break;
				}
			};
		},



		listenMenu10405: function(obj, datas) {//采购订单（内嵌不显示）
			var t = this;
			var tableId = t.c.id_table_main;
			switch(obj.event){
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcgPurchaseByOrder/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-changeChannel'://更换渠道
				{
					if(datas.length == 0) {
						return layer.alert('尚未选中数据');
					}
					var choooseDatas = JSON.stringify(datas);
					layer.confirm('确定要更换渠道所选的订单吗？', { icon: 3 }, function() {
						//layer.msg('处理中', { icon: 16, shade: 0.01 });
						layer.load(1);
						$.ajax({
							type: "POST",
							url: '/api/inter/tcgPurchaseByOrder/changeChannel',
							data: {choooseDatas: choooseDatas},
							success: function (data) {
								layer.closeAll();
								if (data.code == 0) {
									layui.table.reloadData(tableId);
									layer.alert(data.msg);
								} else {
									layui.table.reloadData(tableId);
									layer.alert(data.msg);
								}
							}, error: function() {
								layer.close();
								layer.msg("操作失败，请稍后再试！", { icon: 2 });
							}
						});
					}, function() {});
					break;
				}


				case 'event-to-occupy'://占用红包
				{
					if(datas.length == 0) {
						return layer.alert('尚未选中数据');
					}
					var choooseDatas = JSON.stringify(datas);
					layer.confirm('确定要对所选的订单进行“占用红包”操作吗？', { icon: 3 }, function() {
						//layer.msg('处理中', { icon: 16, shade: 0.01 });
						layer.load(1);
						$.ajax({
							type: "POST",
							url: '/api/inter/tcgPurchaseByOrder/occupy',
							data: {choooseDatas: choooseDatas},
							success: function (data) {
								layer.closeAll();
								if (data.code == 0) {
									layui.table.reloadData(tableId);
									layer.alert(data.msg);
								} else {
									layer.alert(data.msg);
								}
							}, error: function() {
								layer.close();
								layer.msg("操作失败，请稍后再试！", { icon: 2 });
							}
						});
					}, function() {});
					break;
				}

				case 'event-to-examine'://审核
				{
					if(datas.length == 0) {
						return layer.alert('尚未选中数据');
					}
					var choooseDatas = JSON.stringify(datas);
					layer.confirm('确定要审核所选的订单吗？', { icon: 3 }, function() {
						layer.msg('处理中', { icon: 16, shade: 0.01 });
						$.ajax({
							type: "POST",
							url: '/api/inter/tcgPurchaseByOrder/examine',
							data: {choooseDatas: choooseDatas},
							success: function (data) {
								layer.closeAll();
								if (data.code == 0) {
									layui.table.reloadData(tableId);
									layer.alert(data.msg);
								} else {
									layer.alert(data.msg);
								}
							}, error: function() {
								layer.close();
								layer.msg("操作失败，请稍后再试！", { icon: 2 });
							}
						});
					}, function() {});
					break;
				}

				case 'event-to-specialExamine'://特殊审核
				{
					if(datas.length == 0) {
						return layer.alert('尚未选中数据');
					}
					var choooseDatas = JSON.stringify(datas);
					layer.confirm('确定要审核所选的订单吗？', { icon: 3 }, function() {
						layer.msg('处理中', { icon: 16, shade: 0.01 });
						$.ajax({
							type: "POST",
							url: '/api/inter/tcgPurchaseByOrder/specialExamine',
							data: {choooseDatas: choooseDatas},
							success: function (data) {
								layer.closeAll();
								if (data.code == 0) {
									layui.table.reloadData(tableId);
									layer.alert(data.msg);
								} else {
									layer.alert(data.msg);
								}
							}, error: function() {
								layer.close();
								layer.msg("操作失败，请稍后再试！", { icon: 2 });
							}
						});
					}, function() {});
					break;
				}

				case 'event-to-refreshOrder'://刷新订单信息
				{
					if(datas.length == 0) {
						return layer.alert('尚未选中数据');
					}
					var choooseDatas = JSON.stringify(datas);
					layer.confirm('确定要刷新所选的订单吗？', { icon: 3 }, function() {
						layer.msg('处理中', { icon: 16, shade: 0.01 });
						$.ajax({
							type: "POST",
							url: '/api/inter/tcgPurchaseByOrder/refreshOrder',
							data: {choooseDatas: choooseDatas},
							success: function (data) {
								layer.closeAll();
								if (data.code == 0) {
									layui.table.reloadData(tableId);
									layer.alert(data.msg);
								} else {
									layer.alert(data.msg);
								}
							}, error: function() {
								layer.close();
								layer.msg("操作失败，请稍后再试！", { icon: 2 });
							}
						});
					}, function() {});
					break;
				}

				case 'event-to-createOrder'://创建订单
				{
					if(datas.length == 0) {
						return layer.alert('尚未选中数据');
					}
					var choooseDatas = JSON.stringify(datas);
					layer.confirm('确定要创建所选的订单吗？', { icon: 3 }, function() {
						layer.msg('处理中', { icon: 16, shade: 0.01 });
						$.ajax({
							type: "POST",
							url: '/api/inter/tcgPurchaseByOrder/createOrder',
							data: {choooseDatas: choooseDatas},
							success: function (data) {
								layer.closeAll();
								if (data.code == 0) {
									layui.table.reloadData(tableId);
									layer.alert(data.msg);
								} else {
									layer.alert(data.msg);
								}
							}, error: function() {
								layer.close();
								layer.msg("操作失败，请稍后再试！", { icon: 2 });
							}
						});
					}, function() {});
					break;
				}


				case 'event-to-cancelOrder'://取消订单
				{
					if(datas.length == 0) {
						return layer.alert('尚未选中数据');
					}
					var choooseDatas = JSON.stringify(datas);
					layer.confirm('确定要取消所选的订单吗？', { icon: 3 }, function() {
						var util = layui.util;
						layer.prompt({title: '请输入取消原因'}, function(value, index, elem){
							if(value === '') return elem.focus();
							var cancelReason = util.escape(value);
							// 关闭 prompt
							layer.close(index);
							layer.msg('处理中', { icon: 16, shade: 0.01 });
							$.ajax({
								type: "POST",
								url: '/api/inter/tcgPurchaseByOrder/cancelOrder',
								data: {choooseDatas: choooseDatas,cancelReason:cancelReason},
								success: function (data) {
									layer.closeAll();
									if (data.code == 0) {
										layui.table.reloadData(tableId);
										layer.alert(data.msg);
									} else {
										layer.alert(data.msg);
									}
								}, error: function() {
									layer.close();
									layer.msg("操作失败，请稍后再试！", { icon: 2 });
								}
							});

						});



					}, function() {});
					break;
				}


				case 'event-to-updateOrderAmountDiscuss'://修改商议订单金额
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
					    if(datas[0].aliOrderNumber ==undefined || datas[0].aliOrderNumber ==null || datas[0].aliOrderNumber ==''){
                            return  layer.alert('需要在创建1688订单后才可进行商议订单金额的设置');
                        }
						var util = layui.util;
						layer.prompt({title: '请输入商议订单金额'}, function(value, index, elem){
							if(value === '') return elem.focus();
							var price = util.escape(value);
							// 关闭 prompt
							layer.close(index);
							layer.msg('处理中', { icon: 16,shade: 0.01 });
							$.ajax({
								url: '/api/inter/tcgPurchaseByOrder/updateOrderAmountDiscuss',
								data: {bid: datas[0].bid,orderAmountDiscuss: price},
								type: 'POST',
								async: true,
								success: function (res) {
									layer.closeAll();
									layui.table.reloadData(tableId);
									layer.alert(res.msg);
								},
								error: function () {
									layer.close();
									layer.msg("操作失败，请稍后再试！", {icon: 2});
								}
							});

						});
					}
					break;
				}


				case 'event-to-updatePurchaseOrderAmount'://修改采购订单金额（含税）
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						// if(datas[0].aliOrderNumber ==undefined || datas[0].aliOrderNumber ==null || datas[0].aliOrderNumber ==''){
						// 	return  layer.alert('需要在创建1688订单后才可进行采购订单金额（含税）的设置');
						// }
						var util = layui.util;
						layer.prompt({title: '请输入采购订单金额（含税）'}, function(value, index, elem){
							if(value === '') return elem.focus();
							var price = util.escape(value);
							// 关闭 prompt
							layer.close(index);
							layer.msg('处理中', { icon: 16,shade: 0.01 });
							$.ajax({
								url: '/api/inter/tcgPurchaseByOrder/updatePurchaseOrderAmount',
								data: {bid: datas[0].bid,purchaseOrderAmount: price},
								type: 'POST',
								async: true,
								success: function (res) {
									layer.closeAll();
									layui.table.reloadData(tableId);
									layer.alert(res.msg);
								},
								error: function () {
									layer.close();
									layer.msg("操作失败，请稍后再试！", {icon: 2});
								}
							});

						});
					}
					break;
				}

				case 'event-to-updateNegotiatedPrice'://修改协议价
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var util = layui.util;
						layer.prompt({title: '请输入协议价'}, function(value, index, elem){
							if(value === '') return elem.focus();
							var price = util.escape(value);
							// 关闭 prompt
							layer.close(index);
							t.showloadings(true)
							$.ajax({
								url: '/api/inter/tcgPurchaseByOrder/updateNegotiatedPrice',
								data: {bid: datas[0].bid,spBm: datas[0].spBm,negotiatedPrice: price},
								type: 'POST',
								async: true,
								success: function (res) {
									t.showloadings(false)
									debugger
									if (res.code == 0) {
										layer.closeAll();
										layui.table.reloadData(tableId);
										layer.msg(res.msg);
									} else {
										layer.alert(res.msg);
									}

								},
								error: function () {
									t.showloadings(false)
									layer.close();
									layer.alert("操作失败，请稍后再试！", {icon: 2});
								}
							});

						});
					}
					break;
				}

				case 'event-to-workLog'://编辑工作日志
				{
					if(datas.length == 0) {
						return layer.alert('尚未选中数据');
					} else {
						var choooseDatas = JSON.stringify(datas);
						var util = layui.util;
						layer.prompt({title: '请输入工作日志'}, function(value, index, elem){
							if(value === '') return elem.focus();
							var workLog = util.escape(value);
							// 关闭 prompt
							layer.close(index);
							layer.msg('处理中', { icon: 16,shade: 0.01 });
							$.ajax({
								url: '/api/inter/tcgPurchaseByOrder/workLog',
								data: {choooseDatas: choooseDatas,workLog: workLog},
								type: 'POST',
								async: true,
								success: function (res) {
									layer.closeAll();
									layui.table.reloadData(tableId);
									layer.alert(res.msg);
								},
								error: function () {
									layer.close();
									layer.msg("操作失败，请稍后再试！", {icon: 2});
								}
							});

						});
					}
					break;
				}


			};
		},



		listenMenu10406: function(obj, datas) {//采购付款
			var t = this;
			var tableId = t.c.id_table_main;
			switch(obj.event){
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcgPurchaseOrderPay/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}

				case 'event-to-onlinePay'://采购付款
				{
					if(datas.length == 0) {
						return layer.alert('尚未选中数据');
					}
					var choooseDatas = JSON.stringify(datas);
					var goodsIds = '';
					for(var i=0;i<datas.length;i++){
						if(goodsIds==''){
							goodsIds = datas[i].purchasePlanGoodsId;
						}else {
							goodsIds = goodsIds + ',' +datas[i].purchasePlanGoodsId;
						}
					}
					layer.msg('处理中', { icon: 16, shade: 0.01 });
					$.ajax({
						type: "POST",
						url: '/api/inter/tcgPurchaseOrderPay/onlinePay',
						data: {goodsIds: goodsIds},
						success: function (data) {
							if (data.code == 0) {
								/*
								layer.alert(data.msg);
								setTimeout(function(){
									layer.closeAll();
									location.reload();
								}, 3000);

								 */
								//弹出付款方式设置页面
								var w=($(window).width()*0.9);
								var h=($(window).height() - 50);
								var index = layer.open({
									type: 2,
									area: [w+'px', h +'px'],
									fix: true,
									maxmin: false,
									shadeClose: true,
									shade:0.4,
									title: "选择付款方式",
									content: '/web/purchase/tcgPurchaseOrderPay/toEditByPay?goodsIds='+goodsIds
								});

								///console.log('data',data);
								//返回付款跳转链接，并跳转
								//var url = data.data;
								//window.location.href = url;
								//window.open(url);

							} else {
								layer.closeAll();
								layer.alert(data.msg);
							}
						}, error: function() {
							layer.close();
							layer.msg("操作失败，请稍后再试！", { icon: 2 });
						}
					});

					break;
				}

				case 'event-to-examine'://付款审核
				{
					if(datas.length == 0) {
						return layer.alert('尚未选中数据');
					}
					var choooseDatas = JSON.stringify(datas);
					layer.confirm('确定要付款审核所选的单据吗？', { icon: 3 }, function() {
						layer.msg('处理中', { icon: 16, shade: 0.01 });
						$.ajax({
							type: "POST",
							url: '/api/inter/tcgPurchaseOrderPay/examine',
							data: {choooseDatas: choooseDatas},
							success: function (data) {
								layer.closeAll();
								if (data.code == 0) {
									layui.table.reloadData(tableId);
									layer.alert(data.msg);
								} else {
									layer.alert(data.msg);
								}
							}, error: function() {
								layer.close();
								layer.msg("操作失败，请稍后再试！", { icon: 2 });
							}
						});
					}, function() {});
					break;
				}


				case 'event-to-cancel'://取消付款
				{
					if(datas.length == 0) {
						return layer.alert('尚未选中数据');
					}
					var choooseDatas = JSON.stringify(datas);

					layer.open({
						shadeClose:true,
						title: '请选择取消方式',
						content: `
							<form class="layui-form">
							  <div class="layui-form-item">
								<select id="cancelType" lay-filter="aihao">
									<option value="" selected="">请选择</option>
									<option value="0" >按商品</option>
									<option value="1">按订单</option>
								  </select>
							  </div>
							</form>
							`,
						success: function(layero, index) {
							layui.form.render();
							layero.find('.layui-layer-content').css('overflow', 'unset');
						},
						yes: function (index, layero) {
							//$(obj).on('click', window.top.menuItem);
							var cancelType = $('#cancelType').val();
							layer.msg('处理中', { icon: 16, shade: 0.01 });
							$.ajax({
								type: "POST",
								url: '/api/inter/tcgPurchaseOrderPay/cancel',
								data: {choooseDatas: choooseDatas,cancelType: cancelType},
								success: function (data) {
									layer.closeAll();
									if (data.code == 0) {
										layui.table.reloadData(tableId);
										layer.alert(data.msg);
									} else {
										layer.alert(data.msg);
									}
								}, error: function() {
									layer.close();
									layer.msg("操作失败，请稍后再试！", { icon: 2 });
								}
							});
							layer.closeAll();
						}
					});

					break;
				}

			};
		},

		listenMenu10409: function(obj, datas) {//采购订单完成（内嵌不显示）
			var t = this;
			switch(obj.event){

				case 'event-to-trajectory'://物流轨迹查询
				{
					if (datas.length == 0) {
						return layer.alert('尚未选中数据');
					} else if (datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						layer.msg('处理中', { icon: 16, shade: 0.01 });
						$.ajax({
							type: "POST",
							url: '/api/inter/1688/get1688OrderTraceInfo',
							data: {orderNo: datas[0].purchaseOrderBid},
							success: function (data) {
								layer.close();
								if(data.code==0 && data.data){
									t.htmldiv(JSON.stringify(data.data.reverse()))
								}else{
									layer.msg('暂无物流轨迹')
								}
							}, error: function() {
								layer.close();
								layer.msg("操作失败，请稍后再试！", { icon: 2 });
							}
						});
						break;
					}
					break;
				}

				case 'event-to-update'://物流修改
				{
					if (datas.length == 0) {
						return layer.alert('尚未选中数据');
					} else {
						var w = ($(window).width() * 0.3);
						var h = ($(window).height() * 0.4);
						var choooseDatas = JSON.stringify(datas);
						layer.open({
							shadeClose:true,
							area: [w + 'px', h + 'px'],
							title: '物流信息修改',
							content: `
								<form class="layui-form">
								  <div class="layui-form-item">
								  	 <label class="layui-form-label">
								  	 	<font class="f_red">*</font>
								  		 物流渠道
								  	 </label>
    								 <div class="layui-input-block">
									    <input type="text" name="aliLogisticsPlace" id="aliLogisticsPlace" lay-verify="required" placeholder="请输入物流渠道" class="layui-input">
									 </div>
								  </div>
								  <div class="layui-form-item">
								  <label class="layui-form-label">
								  	 	<font class="f_red">*</font>
								  		 物流运单号
								  	 </label>
									<div class="layui-input-block">
									  <input type="text" name="aliLogisticsBillNo" id="aliLogisticsBillNo" lay-verify="required" placeholder="请输入物流运单号" class="layui-input">
									</div>
								  </div>
								</form>
							`,
							success: function(layero, index) {},
							yes: function (index, layero) {
								layer.msg('处理中', { icon: 16, shade: 0.01 });
								var aliLogisticsPlace = $('#aliLogisticsPlace').val();
								var aliLogisticsBillNo = $('#aliLogisticsBillNo').val();
								$.ajax({
									type: "POST",
									url: '/api/inter/tcgOfflinePurchaseInStorage/wlUpdate',
									data: {choooseDatas: choooseDatas,aliLogisticsPlace:aliLogisticsPlace,aliLogisticsBillNo:aliLogisticsBillNo},
									success: function (data) {
										if (data.code == 0) {
											layer.alert(data.msg);
											setTimeout(function(){
												layer.closeAll();
												location.reload();
											}, 3000);
										} else {
											layer.closeAll();
											layer.alert(data.msg);
										}
									}, error: function() {
										layer.close();
										layer.msg("操作失败，请稍后再试！", { icon: 2 });
									}
								});
							}
						});
						break;
					}
					break;
				}
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcgPurchaseOrderWc/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},

		listenMenu10416: function(obj, datas) {//线上采购入库（内嵌不显示）
			var t = this;
			switch (obj.event) {

				case 'event-to-rk'://采购入库
				{
					if (datas.length == 0) {
						return layer.alert('尚未选中数据');
					}
					var choooseDatas = JSON.stringify(datas);
					var infoItems = JSON.parse(choooseDatas);
					if (infoItems.some(item => item.storageStatus != 0)) {
						layer.msg("只允许操作待入库或者超期待入库数据,请核实后在操作!");
						return;
					}
					var printStatus = 0;
					if (infoItems.some(item => item.printStatus == 0)) {
						printStatus = 1;
					}
					if (printStatus == 1){
						layer.confirm('存在未标记的数据,确认取消？', { icon: 3 }, function() {
							var par = "chw=" + "HW00001";//固定仓库
							layui.YsModal.init({
								modalKey: 'TCC_LocationRk',
								colCode: 'aaaa',
								parentObj: window,
								pathGridRequest: '/api/inter/tccLocation/tccLocationRk?' + par
							});
						});

					}else {
						var par = "chw=" + "HW00001";//固定仓库
						layui.YsModal.init({
							modalKey: 'TCC_LocationRk',
							colCode: 'aaaa',
							parentObj: window,
							pathGridRequest: '/api/inter/tccLocation/tccLocationRk?' + par
						});
					}
					window.matchValuesAfterModalSelectRadio = function (colCode, data, extraData) {
						var listId = [];
						for (var i = 0; i < datas.length; i++) {
							listId.push(datas[i].purchaseOrderId)
						}
						layui.layer.msg('处理中', {
							icon: 16,
							shade: 0.01
						});
						$.ajax({
							url: '/api/inter/tcgOfflinePurchaseInStorage/updateRk',
							data: {listId: JSON.stringify(listId), chw: data.chw},
							type: 'POST',
							async: true,
							success: function (result) {
								if (result.code == '0') {
									layer.alert(result.msg);
									//刷新列表
									setTimeout(function () {
										layer.closeAll();
										location.reload();
									}, 1000);
									//return;
								} else {//失败
									layer.close();
									layer.msg("采购入库失败!", {icon: 2});
								}
							},
							error: function () {
								layer.close();
								layer.msg("采购入库失败，请稍后再试！", {icon: 2});
							}
						});
					};

					break;
				}

				case 'event-to-export': {
					$.ajax({
						type: "POST",
						url: '/api/inter/tcgOfflinePurchaseInStorage/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if (data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}

				case 'event-to-qxrk': {
					var choooseDatas = JSON.stringify(datas);
					layui.layer.confirm("取消后不可恢复，确定彻底取消？", {
						btn: ['确定', '取消']
					}, function (index) {
						$.ajax({
							type: "POST",
							url: '/api/inter/tcgOfflinePurchaseInStorage/cancelStorage',
							data: {choooseDatas: choooseDatas},
							success: function (data) {
								if (data.code == 0) {
									layer.alert(data.msg);
									setTimeout(function () {
										layer.closeAll();
										location.reload();
									}, 3000);
								} else {
									alert(data.msg);
								}
							}
						});
						layer.close(index);
					});
					break;
				}
				case 'event-to-dy': {
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "导出表格",
						content: '/web/business/tpYsbExportLog/toExportBid?menuId=10441'
					});
					break;
				}
				case 'event-to-import'://主表信息导入
				{
					t.openImport(10416); // 导入的菜单ID
					break;
				}
			};
		},


		listenMenu10419: function(obj, datas) {// 线上质检上架
			var t = this;
			switch(obj.event) {
				case 'event-to-dy': {
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var listId = [];
						for (var i = 0; i < datas.length; i++) {
							listId.push(datas[i].purchaseOrderId)
						}
						$.ajax({
							type: "POST",
							url: '/api/inter/tccOfflineAssemble/getPdfZj',
							data: {listId: JSON.stringify(listId)},
							success: function (data) {
								if (data.code == 0) {
									if(data.msg != undefined && data.msg.startsWith('http')) {
										var urlBegin = window.location.href.split("//")[0];
										var json = {};
										json.action = "previewfile";	//打印指令动作。json.action = "preview"，则生成预览。
										json.format = "pdf_url";        //指定格式为pdf_url。
										json.paperwidth = 10;
										json.paperlength = 10;

										json.content =  data.msg;   //pdf文件的url路径
										json.cert = "https://file.mini-ease.com/upload/nomodule/202412/13/163232652.ctf";
										var pw = GetPrintWorld();    //获取打天下对象
										pw.Act(json);
										// window.open(data.msg);
										// location.reload();
									} else {
										layer.msg(data.msg);
									}
								} else {
									alert(data.msg);
								}
							}
						});
					}
					break;
				}
				case 'event-to-export': {//导出
					$.ajax({
						type: "POST",
						url: '/api/inter/tccOnlinePuton/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if (data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}

				case 'event-to-doQualityTesting': {//质检上架
					var tableId = t.c.id_table_main;
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var choooseDatas = JSON.stringify(datas);
						layer.confirm('确定要质检上架所选的单据吗？', { icon: 3 }, function() {
							//判断是否要弹出框
							var isRadio = false;
							for(var i=0;i<datas.length;i++){
								if(datas[i].chwSaveType != 1){
									isRadio = true;
								}
							}
							if(isRadio){
								window.matchValuesAfterModalSelectRadio = function(colCode, data, extraData) {
									console.log('data =',data);
									layer.msg('处理中', { icon: 16, shade: 0.01 });
									$.ajax({
										url: '/api/inter/tccOnlinePuton/doQualityTesting',
										data: {
											choooseDatas: choooseDatas,
											chw:data.chw
										},
										type: 'POST',
										async: true,
										success: function(res) {
											console.log('res =',res);
											if (res.code == 0) {
												layer.alert(res.msg);
												setTimeout(function(){
													layer.closeAll();
													location.reload();
												}, 3000);
											} else {
												layer.msg(res.msg);
												layer.closeAll();
											}
										}, error: function() {
											layer.close();
											layer.msg("操作失败，请稍后再试！", { icon: 2 });
										}
									});
								};
								layui.YsModal.init({modalKey: 'TCC_Location', colCode: 'aaaa', parentObj: window});
							}else {
								layer.msg('处理中', { icon: 16, shade: 0.01 });
								$.ajax({
									url: '/api/inter/tccOnlinePuton/doQualityTesting',
									data: {
										choooseDatas: choooseDatas,
										chw:'aaa'
									},
									type: 'POST',
									async: true,
									success: function(res) {
										if (res.code == 0) {
											layer.alert(res.msg);
											setTimeout(function(){
												layer.closeAll();
												location.reload();
											}, 3000);
										} else {
											layer.msg(res.msg);
											layer.closeAll();
										}
									}, error: function() {
										layer.close();
										layer.msg("操作失败，请稍后再试！", { icon: 2 });
									}
								});
							}


						}, function() {});
					}
					break;
				}
				case 'event-to-back':// 组装回退
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var choooseDatas = JSON.stringify(datas);
						layer.confirm('确定组装清单打印？', { icon: 3 }, function() {
							layer.msg('处理中', { icon: 16, shade: 0.01 });
							$.ajax({
								url: '/api/inter/tccOnlinePuton/back',
								data: {
									choooseDatas: choooseDatas
								},
								type: 'POST',
								async: true,
								success: function(data) {
									if (data.code == 0) {
										layer.alert(data.msg);
										setTimeout(function(){
											layer.closeAll();
											layui.table.reloadData(tableId);
										}, 3000);
									} else {
										layer.closeAll();
										layer.alert(data.msg);
									}
								}, error: function() {
									layer.close();
									layer.msg("操作失败，请稍后再试！", { icon: 2 });
								}
							});
						}, function() {
						});
					}
					break;
				}

			};
		},


		listenMenu10420: function(obj, datas) {// 线上组装报错（内嵌不显示）
			var t = this;
			switch(obj.event) {
				case 'event-to-export': {//导出
					$.ajax({
						type: "POST",
						url: '/api/inter/tccOnlineAssembleError/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if (data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}

				case 'event-to-errorHandle': {//报错处理
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var choooseDatas = JSON.stringify(datas);
						var w = ($(window).width() * 0.7);
						var h = ($(window).height() - 50);
						layer.open({
							shadeClose:true,
							title: '请选择处理方式',
							content: `
							<form class="layui-form">
							  <div class="layui-form-item">
								<select id="handleType" lay-filter="aihao">
									<option value="" selected="">请选择</option>
									<option value="0">不处理</option>
									<option value="1">发补货</option>
									<option value="2">采购赔偿</option>
									<option value="3">采购退款</option>
								  </select>
							  </div>
							</form>
							`,
							success: function(layero, index) {
								layui.form.render();
								layero.find('.layui-layer-content').css('overflow', 'unset');
							},
							yes: function (index, layero) {
								//$(obj).on('click', window.top.menuItem);
								var handleType = $('#handleType').val();
								layer.closeAll();
								switch(handleType) {
									case '0': {//不处理

										var w1 = ($(window).width() * 0.3);
										var h1 = ($(window).height() * 0.3);
										layer.open({
											shadeClose:true,
											area: [w1 + 'px', h1 + 'px'],
											title: '请填写原因',
											content: `
												<form class="layui-form">
												  <div class="layui-form-item">
													<label class="layui-form-label">原因</label>
													<div class="layui-input-block">
													  <input type="text" name="errorCause" id="errorCause" lay-verify="required" placeholder="请填写原因" class="layui-input">
													</div>
												  </div>
												</form>
											`,
											success: function(layero, index) {},
											yes: function (index, layero) {
												layer.msg('处理中', { icon: 16,shade: 0.01 });
												var errorCause = $('#errorCause').val();
												console.log('errorCause',errorCause);
												$.ajax({
													type: "POST",
													url: '/api/inter/tccOnlineAssembleError/notHandle',
													data: {
														choooseDatas: choooseDatas,
														errorCause:errorCause
													},
													success: function (data) {
														if (data.code == 0) {
															layer.alert(data.msg);
															setTimeout(function(){
																layer.closeAll();
																location.reload();
															}, 3000);
														} else {
															layer.msg(data.msg);
															layer.closeAll();
														}
													}
												});
											}
										});
										break;
									}

									case '1': {//发补货
										var w2 = ($(window).width() * 0.7);
										var h2 = ($(window).height() * 0.5);
										layer.open({
											shadeClose:true,
											area: [w2 + 'px', h2 + 'px'],
											title: '发补货',
											content: `
												<form class="layui-form">
												  <div class="layui-form-item">
													<label class="layui-form-label">物流方式</label>
													<div class="layui-input-block">
													  <input type="text" name="logisticsMode" id="logisticsMode" lay-verify="required" placeholder="请输入物流方式" class="layui-input">
													</div>
												  </div>
												  <div class="layui-form-item">
													<label class="layui-form-label">物流编码</label>
													<div class="layui-input-block">
													  <input type="text" name="trackingNumber" id="trackingNumber" lay-verify="required" placeholder="请输入物流编码" class="layui-input">
													</div>
												  </div>
												</form>
											`,
											success: function(layero, index) {},
											yes: function (index, layero) {
												layer.msg('处理中', {
													icon: 16,shade: 0.01
												});
												var logisticsMode = $('#logisticsMode').val();
												var trackingNumber = $('#trackingNumber').val();
												$.ajax({
													type: "POST",
													url: '/api/inter/tccOnlineAssembleError/repairSend',
													data: {
														choooseDatas: choooseDatas,
														logisticsMode:logisticsMode,
														trackingNumber:trackingNumber
													},
													success: function (data) {
														if (data.code == 0) {
															layer.msg(data.msg);
															setTimeout(function(){
																layer.closeAll();
																location.reload();
															}, 3000);
														} else {
															layer.msg(data.msg);
															layer.closeAll();
														}
													}
												});
											}
										});
										break;
									}

									case '2': {//采购赔偿
										window.matchValuesAfterModalSelectRadio = function(colCode, data, extraData) {
											console.log('data =',data);
											layer.msg('处理中', { icon: 16, shade: 0.01 });
											$.ajax({
												url: '/api/inter/tccOnlineAssembleError/purchasePay',
												data: {
													choooseDatas: choooseDatas,
													expenseSettleReturnItemId:data.expenseSettleReturnItemId
												},
												type: 'POST',
												async: true,
												success: function(res) {
													if (res.code == 0) {
														layer.alert(res.msg);
														setTimeout(function(){
															layer.closeAll();
															location.reload();
														}, 3000);
													} else {
														layer.msg(res.msg);
														layer.closeAll();
													}
												}, error: function() {
													layer.close();
													layer.msg("操作失败，请稍后再试！", { icon: 2 });
												}
											});
										};
										//费用结算返还单弹出框
										//layui.YsModal.init({modalKey: 'TCW_ExpenseSettleReturn_ByOnlineError', colCode: 'aaaa', parentObj: window});
										layui.YsModal.init({modalKey: 'TCW_ExpenseSettleReturn_ByOnlineError', colCode: 'aaaa', parentObj: window, extraData:{useIn: '_select_on_grid', index: index},
											conditionsDefault: [
												{code: '_ys_returnAmount', value:datas[0].subLostNum},//返还金额
												{code: '_ys_accountDetailedRemark', value:'%'+datas[0].purchaseOrderBid+'%'+datas[0].spBm},//备注
											], sameCode: 'xx'});


										break;
									}
									case '3': {//采购退款
										window.matchValuesAfterModalSelectRadio = function(colCode, data, extraData) {
											console.log('data =',data);
											layer.msg('处理中', { icon: 16, shade: 0.01 });
											$.ajax({
												url: '/api/inter/tccOnlineAssembleError/purchaseBack',
												data: {
													choooseDatas: choooseDatas,
													backBid:data.bid
												},
												type: 'POST',
												async: true,
												success: function(res) {
													if (res.code == 0) {
														layer.alert(res.msg);
														setTimeout(function(){
															layer.closeAll();
															location.reload();
														}, 3000);
													} else {
														layer.msg(res.msg);
														layer.closeAll();
													}
												}, error: function() {
													layer.close();
													layer.msg("操作失败，请稍后再试！", { icon: 2 });
												}
											});
										};
										//采购退款 弹出框
										layui.YsModal.init({modalKey: 'TCC_OnlinePurchaseReturn_ByAssembleError', colCode: 'aaaa', parentObj: window, extraData:{useIn: '_select_on_grid', index: index},
											conditionsDefault: [
												{code: '_ys_returnAmount', value:datas[0].subLostNum},//返还金额
											], sameCode: 'xx'});
										break;
									}
								};

							}
						});
					}
					break;
				}

			};

		},


		listenMenu10423: function(obj, datas) { // 线上商品组装(内嵌不展示)
			var t = this;
			switch(obj.event){
				// 组装清单打印
				case 'event-to-printing':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var bids = '';
						for(var i = 0 ;i < datas.length; i++){
							bids += datas[i].bid + ',';
						}
						layer.confirm('确定组装清单打印？', { icon: 3 }, function() {
							layer.msg('处理中', { icon: 16, shade: 0.01 });
							$.ajax({
								url: '/api/inter/tccOfflineAssemble/printing',
								data: {
									bids: bids.substring(0, bids.length - 1)
								},
								type: 'POST',
								async: true,
								success: function(data) {
									if (data.code == 0) {
										if(data.msg != undefined && data.msg.startsWith('http')) {
											window.open(data.msg);
										} else {
											layer.msg(data.msg);
										}
									} else {
										alert(data.msg);
									}

								}, error: function() {
									layer.close();
									layer.msg("操作失败，请稍后再试！", { icon: 2 });
								}
							});
						}, function() {
						});
					}
					break;
				}
				// 正常组装
				case 'event-to-up':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var choooseDatas = JSON.stringify(datas);
						var infoItems = JSON.parse(choooseDatas);
						// if (infoItems.some(item => item.printStatus == 0)) {
						// 	layer.msg("选择数据中有未打印,请核实后在操作!");
						// 	return;
						// }
						var bids = '';
						for(var i = 0 ;i < datas.length; i++){
							bids += datas[i].bid + ',';
						}
						layer.confirm('确定要正常组装？', { icon: 3 }, function() {
							layer.msg('处理中', { icon: 16, shade: 0.01 });
							$.ajax({
								url: '/api/inter/tccOfflineAssemble/batchPass',
								data: {
									bids: bids.substring(0, bids.length - 1)
								},
								type: 'POST',
								async: true,
								success: function(res) {
									layer.msg(res.msg);
									setTimeout(function(){
										location.reload();
									}, 1000);
								}, error: function() {
									layer.close();
									layer.msg("操作失败，请稍后再试！", { icon: 2 });
								}
							});
						}, function() {
						});
					}
					break;
				}
				case 'event-to-exception': {
					if (datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if (datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var choooseDatas = JSON.stringify(datas);
						var infoItems = JSON.parse(choooseDatas);
						// if (infoItems.some(item => item.printStatus == 0)) {
						// 	layer.msg("选择数据中有未打印,请核实后在操作!");
						// 	return;
						// }
						var w = ($(window).width() * 0.9);
						var h = ($(window).height() - 50);
						var index = layer.open({
							type: 2, area: [w + 'px', h + 'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade: 0.4,
							title: "异常组装",
							content: '/web/storage/tccOfflineAssemble/toError?bid=' + datas[0].bid
						});
					}
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tccOfflineAssemble/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-dy': {
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var listId = [];
						var listOfflineAssembleId = [];
						for (var i = 0; i < datas.length; i++) {
							listId.push(datas[i].purchaseOrderId)
							listOfflineAssembleId.push(datas[i].offlineAssembleId)
						}
						$.ajax({
							type: "POST",
							url: '/api/inter/tccOfflineAssemble/getPdf',
							data: {listId: JSON.stringify(listId),listOfflineAssembleId: JSON.stringify(listOfflineAssembleId)},
							success: function (data) {
								if (data.code == 0) {
									if(data.msg != undefined && data.msg.startsWith('http')) {
										var urlBegin = window.location.href.split("//")[0];
										var json = {};
										json.action = "previewfile";	//打印指令动作。json.action = "preview"，则生成预览。
										json.format = "pdf_url";        //指定格式为pdf_url。
										json.paperwidth = 10;
										json.paperlength = 10;

										json.content =  data.msg;   //pdf文件的url路径
										json.cert = "https://file.mini-ease.com/upload/nomodule/202412/13/163232652.ctf";
										var pw = GetPrintWorld();    //获取打天下对象
										pw.Act(json);
										// window.open(data.msg);
										// location.reload();
									} else {
										layer.msg(data.msg);
									}
								} else {
									alert(data.msg);
								}
							}
						});
					}
					break;
				}
				case 'event-to-cancel':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var row = datas[0];
						layui.layer.confirm("取消组装后不可恢复，确定彻底取消？",{
							btn: ['确定', '取消']
						}, function (index) {
							$.ajax({
								type: "POST",
								url: '/api/inter/tccOfflineAssemble/cancel',
								data: {bid: row.bid},
								success: function (res) {
									if (res.code == 0) {
										layer.alert(res.msg);
										setTimeout(function(){
											layer.closeAll();
											location.reload();
										}, 3000);
									} else {
										layer.alert(res.msg);
									}
								}
							});
							layer.close(index);
						});
					}
					break;
				}
			};
		},

		listenMenu10425: function(obj, datas) { // 线上采购退货单
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl("线上采购退货单 - 新增","/web/storage/tccOnlinePurchaseReturn/toAdd",1);
					break;
				}
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tccOnlinePurchaseReturn/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},


		listenMenu10426: function(obj, datas) { // 手工组装单
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl("手工组装单 - 新增","/web/storage/tccAssembleByHand/toAdd",1);
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tccAssembleByHand/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
		listenMenu10427: function(obj, datas) { // 手工拆装单
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl("手工拆装单 - 新增","/web/storage/tccDisassembleByHand/toAdd",1);
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tccDisassembleByHand/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},

		listenMenu10430: function(obj, datas) { // 库存调拨单
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl("库存调拨单 - 新增","/web/storage/tccStockAllocate/toAdd",1);
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tccStockAllocate/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
		listenMenu10432: function(obj, datas) { // 货位转移单
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl("货位转移单 - 新增","/web/storage/tccLocationTransfer/toAdd",1);
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tccLocationTransfer/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},

		listenMenu10407: function(obj, datas) {// 采购地址维护
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl('采购地址维护-新增',"/web/purchase/tcgPurchaseAddress/toAdd",1);
					break;
				}
				case 'event-to-export'://导出
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcgPurchaseAddress/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-edit':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w = ($(window).width() * 0.9);
						var h = ($(window).height() - 50);
						var index = layer.open({
							type: 2,
							area: [w + 'px', h + 'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade: 0.4,
							title: "编辑",
							content: '/web/purchase/tcgPurchaseAddress/toEdit?id=' + datas[0].id
						});
					}
					break;
				}
			};
		},

		listenMenu10410: function(obj, datas) { // 入账申请单
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl("入账申请单 - 新增","/web/finance/tcwEntryApply/toAdd", 1);
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwEntryApply/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}

				case 'event-to-exportdy':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						$.ajax({
							type: "POST",
							url: '/api/inter/tcwEntryApply/exportdy',
							data: {bid:datas[0].bid},
							success: function (data) {
								if (data.code == 0) {
									if (data.msg != undefined && data.msg.startsWith('http')) {
										window.open(data.msg);
									} else {
										layer.msg(data.msg);
									}
								} else {
									alert(data.msg);
								}
							}
						});
					}
					break;
				}

				case 'event-to-import'://主表信息导入
				{
					t.openImport(10410); // 导入的菜单ID
					break;
				}
			};
		},

		listenMenu10413: function(obj, datas) {
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl('费用划拨单（管理）-新增',"/web/finance/tcwExpenseAllocationByManage/toAdd",1);
					break;
				}
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwExpenseAllocation/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-import'://主表信息导入
				{
					t.openImport(10413); // 导入的菜单ID
					break;
				}
			};
		},



		listenMenu10414: function(obj, datas) {//预约调拨发布单
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl('预约调拨发布单-新增',"/web/storage/tccPreAllocatePublish/toAdd",1);
					break;
				}
				case 'event-to-edit':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl("预约调拨发布单 - 编辑","/web/storage/tccPreAllocatePublish/toEdit?bid="+ datas[0].bid,1);
					}
					break;
				}
				case 'event-to-stop': {//批量停用
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var choooseDatas = JSON.stringify(datas);
						layer.confirm('确定要停用所选的单据吗？', { icon: 3 }, function() {
							layer.msg('处理中', { icon: 16, shade: 0.01 });
							$.ajax({
								url: '/api/inter/tccPreAllocatePublish/stop',
								data: {
									choooseDatas: choooseDatas
								},
								type: 'POST',
								async: true,
								success: function(res) {
									if (res.code == 0) {
										layer.alert(res.msg);
										setTimeout(function(){
											layer.closeAll();
											location.reload();
										}, 3000);
									} else {
										layer.alert(res.msg);
										layer.closeAll();
									}
								}, error: function() {
									layer.close();
									layer.msg("操作失败，请稍后再试！", { icon: 2 });
								}
							});
						}, function() {});
					}
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tccPreAllocatePublish/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},


		listenMenu10421: function(obj, datas) {//库存出库
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl('库存出库-新增',"/web/storage/tccStockOutbound/toAdd",1);
					break;
				}

				case 'event-to-delete':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					}else {
						console.log(datas[0])
						layer.confirm('确定要删除吗？', {icon: 3}, function () {
							layer.msg('处理中', {
								icon: 16,shade: 0.01
							});

						}, function () {});
					}
					break;
				}
			};
		},

		listenMenu10434: function(obj, datas) {//FBA计划单
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl('FBA计划单-新增',"/web/storage/tccFbaPlan/toAdd",1);
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tccFbaPlan/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-del':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var _list = [];
						for (var i = 0; i < datas.length; i++) {
							_list[i] = datas[i].bid;
						}
						layer.confirm('确定要计划取消吗？', { icon: 3 }, function() {
							layer.msg('处理中', { icon: 16, shade: 0.01 });
							$.ajax({
								url: '/api/inter/tccFbaPlan/delete',
								data: "list=" + _list,
								type: 'POST',
								async: true,
								success: function(res) {
									if (res.code == 0) {
										layer.msg(res.msg);
										setTimeout(function(){
											layer.closeAll();
											location.reload();
										}, 3000);
									} else {
										layer.msg(res.msg);
									}
								}, error: function() {
									layer.close();
									layer.msg("操作失败，请稍后再试！", { icon: 2 });
								}
							});
						}, function() {
						});
					}
					break;
				}
				case 'event-to-flow'://FBA计划单审核
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						layer.confirm('确定要计划审核吗？', { icon: 3 }, function() {
							layer.msg('处理中', { icon: 16, shade: 0.01 });
							$.ajax({
								url: '/api/inter/tccFbaPlan/flow',
								data: {id:datas[0].id},
								type: 'POST',
								async: true,
								success: function(res) {
									if (res.code == 0) {
										//自动
										if(datas[0].creationMethod == 1){
											//1按SKU自动发货
											if(datas[0].deliverState == 1){
												layer.closeAll();
												var w = ($(window).width() * 0.8);
												var h = ($(window).height() * 0.8);

												layer.open({
													type: 2, area: [w + 'px', h + 'px'],
													fix: true,
													maxmin: false,
													shadeClose: true,
													shade: 0.4,
													title: "货件预览",
													content: '/web/storage/tccFbaPlan/flow?bid=' + datas[0].bid,
												});
												return
											}
										}

										layer.msg(res.msg);
										setTimeout(function(){
											layer.closeAll();
											location.reload();
										}, 3000);
									} else {
										layer.msg(res.msg);
									}
								}, error: function() {
									layer.close();
									layer.msg("操作失败，请稍后再试！", { icon: 2 });
								}
							});
						}, function() {
						});
					}
					break;
				}
			};
		},

			listenMenu10435: function(obj, datas) {//FBA装箱单
				var t = this;
				var tableId = t.c.id_table_main;
				switch(obj.event){
					case 'event-to-distributionPrint'://配货清单打印
					{
						if(datas.length == 0) {
							layer.alert('尚未选中数据');
						} else {
							layer.msg('处理中', { icon: 16, shade: 0.01 });
							var choooseDatas = JSON.stringify(datas);
							$.ajax({
								type: "POST",
								url: '/api/inter/tccFbaBoxUp/distributionPrint',
								data: {
									choooseDatas: choooseDatas
								},
								success: function (data) {
									layer.closeAll();
									if (data.code == 0) {
										if (data.msg != undefined && data.msg.startsWith('http')) {
											window.open(data.msg);
										} else {
											layer.msg(data.msg);
										}
									} else {
										alert(data.msg);
									}
								}
							});
						}
						break;
					}
					case 'event-to-tagGoodsPrint'://商品标打印
					{
						if(datas.length == 0) {
							layer.alert('尚未选中数据');
						} else if(datas.length > 1) {
							layer.alert('只能选中一行数据');
						} else {
							var w = ($(window).width() * 0.9);
							var h = ($(window).height() - 50);
							var index = layer.open({
								type: 2, area: [w + 'px', h + 'px'],
								fix: true,
								maxmin: false,
								shadeClose: true,
								shade: 0.4,
								title: "商品标打印",
								content: '/web/storage/tccFbaBoxUp/printTag?bid=' + datas[0].bid+"&printType=0"
							});
						}
						break;
					}
					case 'event-to-tagTransparentPrint'://透明标打印
					{
						if(datas.length == 0) {
							layer.alert('尚未选中数据');
						} else if(datas.length > 1) {
							layer.alert('只能选中一行数据');
						} else {
							var w = ($(window).width() * 0.9);
							var h = ($(window).height() - 50);
							var index = layer.open({
								type: 2, area: [w + 'px', h + 'px'],
								fix: true,
								maxmin: false,
								shadeClose: true,
								shade: 0.4,
								title: "透明标打印",
								content: '/web/storage/tccFbaBoxUp/printTag?bid=' + datas[0].bid+"&printType=1"
							});
						}
						break;
					}
					case 'event-to-tagEurPrint'://欧代标打印
					{
						if(datas.length == 0) {
							layer.alert('尚未选中数据');
						} else if(datas.length > 1) {
							layer.alert('只能选中一行数据');
						} else {
							var w = ($(window).width() * 0.9);
							var h = ($(window).height() - 50);
							var index = layer.open({
								type: 2, area: [w + 'px', h + 'px'],
								fix: true,
								maxmin: false,
								shadeClose: true,
								shade: 0.4,
								title: "欧代标打印",
								content: '/web/storage/tccFbaBoxUp/printTag?bid=' + datas[0].bid+"&printType=2"
							});
						}
						break;
					}
					case 'event-to-boxRoleStorage'://箱规编辑
					{
						if(datas.length == 0) {
							layer.alert('尚未选中数据');
						} else if(datas.length > 1) {
							layer.alert('只能选中一行数据');
						} else {
							t.showloadings(true)
							$.ajax({
								type: "POST",
								url: '/api/inter/tccFbaBoxUp/ifLabels',
								data: {
									bid: datas[0].bid
								},
								success: function (data) {
									layer.closeAll();
									if (data.code == 0) {
										t.showloadings(false)
										var w = ($(window).width() * 0.9);
										var h = ($(window).height() - 50);
										var index = layer.open({
											type: 2, area: [w + 'px', h + 'px'],
											fix: true,
											maxmin: false,
											shadeClose: true,
											shade: 0.4,
											title: "箱规编辑",
											content: '/web/storage/tccFbaBoxUp/boxRoleEdit?bid=' + datas[0].bid+"&tableId="+tableId+"&isSearch=0"
										});

									} else {
										t.showloadings(false)
										alert(data.msg);
									}
								}
							});

						}
						break;
					}
					case 'event-to-boxRoleBusiness'://箱规查询
					{
						if(datas.length == 0) {
							layer.alert('尚未选中数据');
						} else if(datas.length > 1) {
							layer.alert('只能选中一行数据');
						} else {
							var w = ($(window).width() * 0.9);
							var h = ($(window).height() - 50);
							var index = layer.open({
								type: 2, area: [w + 'px', h + 'px'],
								fix: true,
								maxmin: false,
								shadeClose: true,
								shade: 0.4,
								title: "箱规查询",
								content: '/web/storage/tccFbaBoxUp/boxRoleEdit?bid=' + datas[0].bid+"&tableId="+tableId+"&isSearch=1"
							});
						}
						break;
					}
					case 'event-to-fbaImport'://FBA导入
					{
						if (datas.length == 0) {
							return layer.alert('尚未选中数据');
						} else if(datas.length > 1) {
							layer.alert('只能选中一行数据');
						} else {
							if(datas[0].creationMethod == '1'){//自动 无需导入
								layer.alert('下单方式\'自动\'，无需导入');
							}

							var w = ($(window).width() * 0.6);
							var h = ($(window).height() * 0.4);
							//var choooseDatas = JSON.stringify(datas);
							layer.open({
								shadeClose:true,
								area: [w + 'px', h + 'px'],
								title: 'FBA导入',
								content: `
						<form class="layui-form">
						  <div class="layui-form-item">
							 <label class="layui-form-label">
								<font class="f_red">*</font>
								 FBA编号
							 </label>
							 <div class="layui-input-block">
								<input type="text" name="fbaNo" id="fbaNo" lay-verify="required" placeholder="请输入FBA编号" class="layui-input">
							 </div>
						  </div>
						  <div class="layui-form-item">
						  <label class="layui-form-label">
								<font class="f_red">*</font>
								 FBA追踪编号
							 </label>
							<div class="layui-input-block">
							  <input type="text" name="fbaTrackNo" id="fbaTrackNo" lay-verify="required" placeholder="请输入FBA追踪编号" class="layui-input">
							</div>
						  </div>
						</form>
					`,
								success: function(layero, index) {},
								yes: function (index, layero) {
									layer.msg('处理中', { icon: 16, shade: 0.01 });
									var fbaNo = $('#fbaNo').val();
									var fbaTrackNo = $('#fbaTrackNo').val();
									$.ajax({
										type: "POST",
										url: '/api/inter/tccFbaBoxUp/fbaImport',
										data: {
											bid: datas[0].bid,
											fbaNo:fbaNo,
											fbaTrackNo:fbaTrackNo
										},
										success: function (data) {
											if (data.code == 0) {
												layer.closeAll();
												layui.table.reloadData(tableId);
												layer.alert(data.msg);
											} else {
												layer.closeAll();
												layer.alert(data.msg);
											}
										}, error: function() {
											layer.close();
											layer.msg("操作失败，请稍后再试！", { icon: 2 });
										}
									});
								}
							});
							break;
						}
						break;
					}
					case 'event-to-planCancel'://计划取消
					{
						if(datas.length == 0) {
							layer.alert('尚未选中数据');
						} else {
							var choooseDatas = JSON.stringify(datas);
							layer.confirm('该操作将按照FBA计划单取消，自动发货将取消后台货件计划，手动发货请自行取消后台货件计划，请确认。', { icon: 3 }, function() {
								layer.msg('处理中', { icon: 16, shade: 0.01 });
								$.ajax({
									url: '/api/inter/tccFbaBoxUp/planCancel',
									data: {
										choooseDatas: choooseDatas
									},
									type: 'POST',
									async: true,
									success: function(res) {
										if (res.code == 0) {
											layer.closeAll();
											layui.table.reloadData(tableId);
											layer.alert(res.msg);
										} else {
											layer.closeAll();
											layer.alert(res.msg);
										}
									}, error: function() {
										layer.close();
										layer.msg("操作失败，请稍后再试！", { icon: 2 });
									}
								});
							}, function() {});
						}
						break;
					}

					case 'event-to-planCancelOperation'://计划取消（运营）
					{
						if(datas.length == 0) {
							layer.alert('尚未选中数据');
						} else {
							var choooseDatas = JSON.stringify(datas);
							layer.confirm('该操作将按照FBA计划单取消，自动发货将取消后台货件计划，手动发货请自行取消后台货件计划，请确认。', { icon: 3 }, function() {
								layer.msg('处理中', { icon: 16, shade: 0.01 });
								$.ajax({
									url: '/api/inter/tccFbaBoxUp/planCancelByOperation',
									data: {
										choooseDatas: choooseDatas
									},
									type: 'POST',
									async: true,
									success: function(res) {
										console.log('res',res);
										if (res.code == 0) {
											layer.closeAll();
											layui.table.reloadData(tableId);
											layer.alert(res.msg);
										} else {
											layer.closeAll();
											layer.alert(res.msg);
										}
									}, error: function() {
										layer.close();
										layer.msg("操作失败，请稍后再试！", { icon: 2 });
									}
								});
							}, function() {});
						}
						break;
					}

					case 'event-to-logisticsDetail'://物流方式详情
					{
						if(datas.length == 0) {
							layer.alert('尚未选中数据');
						} else if(datas.length > 1) {
							layer.alert('只能选中一行数据');
						} else {
							t.openUrl("物流方式详情","/web/storage/tccFbaPlan/toEditWl?bid="+datas[0].bidFbaPlan,1);
						}
						break;
					}


					case 'event-to-editLogisticsMethod'://物流服务名称修改
					{
						if(datas.length == 0) {
							layer.alert('尚未选中数据');
						} else if(datas.length > 1) {
							layer.alert('只能选中一行数据');
						} else {
							window.matchValuesAfterModalSelectRadio = function(colCode, data, extraData) {
								console.log('data =',data);
								var chooseId = data.id;
								layui.layer.msg('处理中', {icon: 16,shade: 0.01});
								$.ajax({
									url: '/api/inter/tccFbaBoxUp/editLogisticsMethod',
									data: {bid:datas[0].bid,logisticsMethodId:chooseId},
									type: 'POST',
									async: false,
									success: function (result) {
										if(result.code=='0'){
											layer.closeAll();
											layui.table.reloadData(tableId);
											layer.alert(result.msg);
											//return;
										}else {//失败
											layer.closeAll();
											layer.alert(result.msg);
										}
									},
									error: function () {
										layer.close();
										layer.msg("新增失败，请稍后再试！", {icon: 2});
									}
								});
							};
							layui.YsModal.init({
								modalKey: 'TCC_LogisticsMethodFbaPlan',
								colCode: 'aaaa',
								parentObj: window,
								extraData:{},
								conditionsDefault: [],
								sameCode: 'xx',
								pathGridRequest: '/api/inter/tccLogisticsMethod/searchFbaPlan?shopId='+datas[0].shopId+"&vgsbm="+datas[0].vgsbm
							});
						}
						break;
					}



					case 'event-to-examine'://装箱审核
					{
						if(datas.length == 0) {
							layer.alert('尚未选中数据');
						} else if(datas.length > 1) {
							layer.alert('只能选中一行数据');
						} else {
							//var choooseDatas = JSON.stringify(datas);
							layer.confirm('确定要装箱审核所选择的数据？', { icon: 3 }, function() {
								layer.msg('处理中', { icon: 16, shade: 0.01 });
								//creationMethod 下单方式(0.手动|1.自动)
								//deliverState 发货计划（1按SKU自动发货，0按箱自动发货）
								//console.log('datas[0]',datas[0]);
								if(datas[0].creationMethod == '1' && datas[0].deliverState == '0') {//自动 && 按箱自动发货
									//验证
									$.ajax({
										url: '/api/inter/tccFbaBoxUp/examineAutoByCheck',
										data: {
											bidFbaPlan: datas[0].bidFbaPlan,
											bid: datas[0].bid
										},
										type: 'POST',
										async: true,
										success: function(res) {
											layer.closeAll();
											if (res.code == 0) {
												var isReCountPurchaseAmount = 1;
												if(res.msg=='pass'){//无需重新计算采购价
													isReCountPurchaseAmount = 0;
												}

												//跳转 货件预览页面
												var w = ($(window).width() * 0.9);
												var h = ($(window).height() - 50);
												var index = layer.open({
													type: 2, area: [w + 'px', h + 'px'],
													fix: true,
													maxmin: false,
													shadeClose: true,
													shade: 0.4,
													title: "货件预览",
													content: '/web/storage/tccFbaBoxUp/shipmentPreview?bid=' + datas[0].bid+'&isReCountPurchaseAmount='+isReCountPurchaseAmount+"&tableId="+tableId
												});

											} else {
												layer.alert(res.msg);
											}
										}, error: function() {
											layer.closeAll();
											layer.alert("操作失败，请稍后再试！", { icon: 2 });
										}
									});




								}else {//手动 || 自动 * 按SKU自动发货
									$.ajax({
										url: '/api/inter/tccFbaBoxUp/examine',
										data: {
											bidFbaPlan: datas[0].bidFbaPlan,
											bid: datas[0].bid
										},
										type: 'POST',
										async: true,
										success: function(res) {
											layer.closeAll();
											if (res.code == 0) {
												layui.table.reloadData(tableId);
												layer.alert(res.msg);
											} else {
												layer.alert(res.msg);
											}
										}, error: function() {
											layer.closeAll();
											layer.alert("操作失败，请稍后再试！", { icon: 2 });
										}
									});
								}

							}, function() {});
						}

						break;
					}

					case 'event-to-export'://导出
					{
						$.ajax({
							type: "POST",
							url: '/api/inter/tccFbaBoxUp/export',
							data: t.c.gridObj.getConds(2),
							success: function (data) {
								if (data.code == 0) {
									if(data.msg != undefined && data.msg.startsWith('http')) {
										window.open(data.msg);
									} else {
										layer.msg(data.msg);
									}
								} else {
									alert(data.msg);
								}
							}
						});
						break;
					}
				};
			},



		listenMenu10437: function(obj, datas) {//物流方式维护
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl('物流服务维护-新增',"/web/storage/tccLogisticsMethod/toAdd",1);
					break;
				}
				case 'event-to-edit':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl("物流服务维护 - 编辑","/web/storage/tccLogisticsMethod/toEdit?id="+ datas[0].id,1);
					}
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tccLogisticsMethod/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},

		listenMenu20452: function(obj, datas) {//FBA取消单(内嵌不展示)
			var t = this;
			var tableId = t.c.id_table_main;
			switch(obj.event){
				case 'event-to-passCancel'://取消确认
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var shipmentState = datas[0].shipmentState;
						if(shipmentState==0){//未装箱/未配货
							layer.confirm('确定要\"取消\"所选的单据吗', { icon: 3 }, function() {
								layer.msg('处理中', { icon: 16, shade: 0.01 });
								$.ajax({
									url: '/api/inter/tccFbaCancel/passCancelByNoPrepare',
									data: {
										bid: datas[0].bid
									},
									type: 'POST',
									async: true,
									success: function(res) {
										layer.closeAll();
										if (res.code == 0) {
											layui.table.reloadData(tableId);
											layer.alert(res.msg);
										} else {
											layer.alert(res.msg);
										}
									}, error: function() {
										layer.closeAll();
										layer.msg("操作失败，请稍后再试！", { icon: 2 });
									}
								});
							}, function() {});
						}else {
							//弹出付款方式设置页面
							var w=($(window).width()*0.9);
							var h=($(window).height() - 50);
							var index = layer.open({
								type: 2,
								area: [w+'px', h +'px'],
								fix: true,
								maxmin: false,
								shadeClose: true,
								shade:0.4,
								title: "取消确认",
								content: '/web/storage/tccFbaCancel/doCancel?bid='+datas[0].bid
							});
						}


					}
					break;
				}
				case 'event-to-noCancel'://暂不取消
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var choooseDatas = JSON.stringify(datas);
						layer.confirm('确定要\"暂不取消\"所选的单据吗', { icon: 3 }, function() {
							layer.msg('处理中', { icon: 16, shade: 0.01 });
							$.ajax({
								url: '/api/inter/tccFbaCancel/noCancel',
								data: {
									choooseDatas: choooseDatas
								},
								type: 'POST',
								async: true,
								success: function(res) {
									layer.closeAll();
									if (res.code == 0) {
										layui.table.reloadData(tableId);
										layer.alert(res.msg);
									} else {
										layer.alert(res.msg);
									}
								}, error: function() {
									layer.closeAll();
									layer.msg("操作失败，请稍后再试！", { icon: 2 });
								}
							});
						}, function() {});
					}
					break;
				}
				case 'event-to-export'://导出
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tccFbaCancel/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},

		listenMenu20453: function(obj, datas) {//FBA发货单(内嵌不展示)
			var t = this;
			switch(obj.event){
				case 'event-to-del':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					}else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					}else {
						layer.confirm('该操作将按照FBA计划单取消，自动发货将取消后台货件计划，手动发货请自行取消后台货件计划，请确认？', { icon: 3 }, function() {
							layer.msg('处理中', { icon: 16, shade: 0.01 });
							$.ajax({
								url: '/api/inter/tccFbaDeliver/delete',
								data: {id:datas[0].id,type:0},
								type: 'POST',
								async: true,
								success: function(res) {
									if (res.code == 0) {
										layer.msg(res.msg);
										setTimeout(function(){
											layer.closeAll();
											location.reload();
										}, 3000);
									} else {
										layer.msg(res.msg);
									}
								}, error: function() {
									layer.close();
									layer.msg("计划取消失败，请稍后再试！", { icon: 2 });
								}
							});
						}, function() {
						});
					}
					break;
				}
				case 'event-to-flow'://转运审核
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					}else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					}else {
						layer.confirm('确定要转运审核所选择的数据？', { icon: 3 }, function() {
							layer.msg('处理中', { icon: 16, shade: 0.01 });
							$.ajax({
								url: '/api/inter/tccFbaDeliver/flow',
								data: {id:datas[0].id},
								type: 'POST',
								async: true,
								success: function(res) {
									if (res.code == 0) {
										layer.msg(res.msg);
										setTimeout(function(){
											layer.closeAll();
											location.reload();
										}, 3000);
									} else {
										layer.msg(res.msg);
									}
								}, error: function() {
									layer.close();
									layer.msg("转运审核失败，请稍后再试！", { icon: 2 });
								}
							});
						}, function() {
						});
					}
					break;
				}
				case 'event-to-wl'://FBA发货物流方式详情
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					}else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					}else {
						t.openUrl("FBA发货物流方式详情","/web/storage/tccFbaDeliver/toEditWl?bid="+datas[0].bid,1);
					}
					break;
				}
				case 'event-to-fy'://FBA发货实际费用详情
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					}else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					}else {
						t.openUrl("FBA发货实际费用详情","/web/storage/tccFbaDeliver/toEditFee?bid="+datas[0].bid,1);
					}
					break;
				}
			};
		},

		listenMenu20462: function(obj, datas) {//FBA完成单(内嵌不展示)
			var t = this;
			switch(obj.event){
				case 'event-to-del':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					}else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					}else {
						layer.confirm('该操作将按照FBA计划单取消，自动发货将取消后台货件计划，手动发货请自行取消后台货件计划，请确认？', { icon: 3 }, function() {
							layer.msg('处理中', { icon: 16, shade: 0.01 });
							$.ajax({
								url: '/api/inter/tccFbaDeliver/delete',
								data: {id:datas[0].id,type:1},
								type: 'POST',
								async: true,
								success: function(res) {
									if (res.code == 0) {
										layer.msg(res.msg);
										setTimeout(function(){
											layer.closeAll();
											location.reload();
										}, 3000);
									} else {
										layer.msg(res.msg);
									}
								}, error: function() {
									layer.close();
									layer.msg("计划取消失败，请稍后再试！", { icon: 2 });
								}
							});
						}, function() {
						});
					}
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tccFbaDeliver/exportWc',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				// 箱标打印
				case 'event-to-printing':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					}  else {
						var _list = [];
						for (var i = 0; i < datas.length; i++) {
							_list[i] = datas[i].id;
						}

						layer.confirm('确定箱标打印？', { icon: 3 }, function() {
							layer.msg('处理中', { icon: 16, shade: 0.01 });
							$.ajax({
								url: '/api/inter/tccFbaDeliver/printing',
								data: "list=" + _list,
								type: 'POST',
								async: true,
								success: function(res) {
									if (res.code == 0) {
										for (let i = 0; i < res.data.length; i++) {
											var urlPdf = res.data[i].data; // 拼接PDF的完整路径
											var dataOther = res.data[i].dataOther; // 拼接PDF的完整路径
											var json = {};
											json.action = "previewfile";   //打印指令动作。json.action = "preview"，则生成预览。
											json.format = "pdf_url";        //指定格式为pdf_url。
											json.docwidth = 20; // 单位：cm
											json.doclength = 30; // 单位：cm

											json.paperwidth = 10;
											json.paperlength = 10;

											json.content =  [dataOther,urlPdf,urlPdf,urlPdf,urlPdf];   //pdf文件的url路径
											// json.cert = window.location.href.split("/web")[0] + "/static/plugins/printWorld/pdf_mini-ease.com.ctf";
											json.cert = "https://file.mini-ease.com/upload/nomodule/202412/13/163232652.ctf";
											var pw = GetPrintWorld();    //获取打天下对象
											pw.Act(json);
											location.reload();
										}

									} else {
										layer.msg(res.msg);
									}
								}, error: function() {
									layer.close();
									layer.msg("操作失败，请稍后再试！", { icon: 2 });
								}
							});
						}, function() {
						});
					}
					break;
				}
			};
		},

		listenMenu20458: function(obj, datas) {//运输类型维护
			var t = this;
			switch(obj.event){
				case 'event-to-add': {
					var w = ($(window).width() * 0.9);
					var h = ($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w + 'px', h + 'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade: 0.4,
						title: "新增",
						content: '/web/storage/tccTransportationType/toAdd'
					});
					break;
				}
				case 'event-to-edit': {
					if (datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if (datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w = ($(window).width() * 0.9);
						var h = ($(window).height() - 50);
						var index = layer.open({
							type: 2, area: [w + 'px', h + 'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade: 0.4,
							title: "修改",
							content: '/web/storage/tccTransportationType/toEdit?id=' + datas[0].id
						});
					}
					break;
				}
			};
		},
		listenMenu20460: function(obj, datas) {//预估费用详情
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl('预估费用详情-新增',"/web/storage/tccEstimatedCostDetail/toAdd",1);
					break;
				}
			};
		},


		listenMenu10422: function(obj, datas) {//库存入库
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl('库存入库-新增',"/web/storage/tccStockStore/toAdd",1);
					break;
				}

				case 'event-to-delete':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					}else {
						console.log(datas[0])
						layer.confirm('确定要删除吗？', {icon: 3}, function () {
							layer.msg('处理中', {
								icon: 16,shade: 0.01
							});

						}, function () {});

					}
					break;
				}
			};
		},

		listenMenu10443: function(obj, datas) {//HW商品库
			var t = this;
			switch(obj.event){
				case 'event-to-add'://新增
				{
					t.openUrl('HW商品库-新增',"/web/overseas/tosProductBasis/toAdd",1);
					break;
				}
				case 'event-to-addBatch'://批量新增
				{
					t.openImport(10443); // 导入的菜单ID
					break;
				}
				case 'event-to-edit'://编辑
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl('HW商品库-编辑',"/web/overseas/tosProductBasis/toEdit?id=" + datas[0].id,1);
					}
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tosProductBasis/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-importDetail'://批量新增导入详情
				{
					var w = ($(window).width() * 0.9);
					var h = ($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w + 'px', h + 'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade: 0.4,
						title: "批量新增导入详情",
						content: '/indexCommonOfMenu?menuId=20455&_condFields=infoType&_condValues=1'
					});
					break;
				}






			};
		},


		listenMenu10444: function(obj, datas) {// HW平台信息维护
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "新增",
						content: '/web/overseas/tosPlatformInformation/toAdd'
					});
					break;
				}
				case 'event-to-edit'://编辑
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w=($(window).width()*0.9);
						var h=($(window).height() - 50);
						var index = layer.open({
							type: 2,
							area: [w+'px', h +'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade:0.4,
							title: "编辑",
							content: '/web/overseas/tosPlatformInformation/toEdit?id=' + datas[0].id
						});
					}
					break;
				}
			};
		},

		listenMenu10445: function(obj, datas) { // HW商品选品库
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl("HW商品选品库 - 新增","/web/overseas/tosProductSelection/toAdd", 1);
					break;
				}

				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tosProductSelection/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},

		listenMenu10446: function(obj, datas) {//HW商品渠道库存
			var t = this;
			switch(obj.event){
				case 'event-to-addBatch'://批量新增
				{
					t.openImport(10446); // 导入的菜单ID
					break;
				}

				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tosChannelStock/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}

			};
		},



		listenMenu10447: function(obj, datas) {//HW商品listing库
			var t = this;
			switch(obj.event){

				case 'event-to-addBatch'://批量导入
				{
					t.openImport(10447); // 导入的菜单ID
					break;
				}
				case 'event-to-imgBatch'://批量导入图片
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w+'px', h +'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade:0.4,
						title: "批量导入图片",
						content: '/web/overseas/tosProductActive/imgBatch'
					});
					break;
				}
				case 'event-to-edit'://编辑
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl('HW商品listing库-编辑',"/web/overseas/tosProductActive/toEdit?id=" + datas[0].id,1);
					}
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tosProductActive/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}

				case 'event-to-importDetail'://批量新增导入详情
				{
					var w = ($(window).width() * 0.9);
					var h = ($(window).height() - 50);
					var index = layer.open({
						type: 2,
						area: [w + 'px', h + 'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade: 0.4,
						title: "批量新增导入详情",
						content: '/indexCommonOfMenu?menuId=20455&_condFields=infoType&_condValues=2'
					});
					break;
				}


			};
		},

		listenMenu10448: function(obj, datas) { // HW采购计划
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl("HW采购计划 - 新增","/web/overseas/tosPurchasePlan/toAdd", 1);
					break;
				}

				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tosPurchasePlan/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-qx':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var row = datas[0];
						layui.layer.confirm("计划取消后不可恢复，确定彻底取消？",{
							btn: ['确定', '取消']
						}, function (index) {
							$.ajax({
								type: "POST",
								url: '/api/inter/tosPurchasePlan/qx',
								data: {id: row.purchasePlanSonId},
								success: function (res) {
									if (res.code == 0) {
										layer.alert(res.msg);
										setTimeout(function(){
											layer.closeAll();
											location.reload();
										}, 3000);
									} else {
										layer.alert(res.msg);
									}
								}
							});
							layer.close(index);
						});
					}
					break;
				}
				case 'event-to-sh':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					}  else {
						var _list = [];
						for(var i=0;i<datas.length;i++){
							_list[i]=datas[i].purchasePlanSonId;
						}

						layui.layer.confirm("提示：请确认货款支付，付款请备注HW采购计划单号，在进行计划审核",{
							btn: ['确定', '取消']
						}, function (index) {
							$.ajax({
								type: "POST",
								url: '/api/inter/tosPurchasePlan/sh',
								data: "list="+_list,
								success: function (res) {
									if (res.code == 0) {
										layer.alert(res.msg);
										setTimeout(function(){
											layer.closeAll();
											location.reload();
										}, 3000);
									} else {
										layer.alert(res.msg);
									}
								}
							});
							layer.close(index);
						});
					}
					break;
				}
			};
		},

		listenMenu10449: function(obj, datas) { // HW采购结算
			var t = this;
			switch(obj.event){

				case 'event-to-qx':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var row = datas[0];
						layui.layer.confirm("结算取消后不可恢复，确定彻底取消？",{
							btn: ['确定', '取消']
						}, function (index) {
							$.ajax({
								type: "POST",
								url: '/api/inter/tosPurchasePlanItemJs/qx',
								data: {id: row.id},
								success: function (res) {
									if (res.code == 0) {
										layer.alert(res.msg);
										setTimeout(function(){
											layer.closeAll();
											location.reload();
										}, 3000);
									} else {
										layer.alert(res.msg);
									}
								}
							});
							layer.close(index);
						});
					}
					break;
				}
				case 'event-to-sh':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var row = datas[0];
						var title = '确认结算审核吗?'
						if (row.purchaseAmount - row.purchaseCostPrice > 0 || row.deliveryAmount - row.deliveryCostPrice > 0){
							title = '提示：利润不足，请确认。'
						}
						layui.layer.confirm(title,{
							btn: ['确定', '取消']
						}, function (index) {
							$.ajax({
								type: "POST",
								url: '/api/inter/tosPurchasePlanItemJs/sh',
								data: {id: row.id},
								success: function (res) {
									if (res.code == 0) {
										layer.alert(res.msg);
										setTimeout(function(){
											layer.closeAll();
											location.reload();
										}, 3000);
									} else {
										layer.alert(res.msg);
									}
								}
							});
							layer.close(index);
						});
					}
					break;
				}
			};
		},
		listenMenu10450: function(obj, datas) { // HW采购发货
			var t = this;
			switch(obj.event){
				case 'event-to-dddr'://追踪编码订单导入
				{
					t.openImport(10449); // 导入的菜单ID
					break;
				}
				case 'event-to-spdr'://追踪编码商品编码导入
				{
					t.openImport(10450); // 导入的菜单ID
					break;
				}
				case 'event-to-qx':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var row = datas[0];
						layui.layer.confirm("发货取消后不可恢复，确定彻底取消？",{
							btn: ['确定', '取消']
						}, function (index) {
							$.ajax({
								type: "POST",
								url: '/api/inter/tosPurchasePlanItemFh/qx',
								data: {id: row.id},
								success: function (res) {
									if (res.code == 0) {
										layer.alert(res.msg);
										setTimeout(function(){
											layer.closeAll();
											location.reload();
										}, 3000);
									} else {
										layer.alert(res.msg);
									}
								}
							});
							layer.close(index);
						});
					}
					break;
				}
				case 'event-to-dr':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var row = datas[0];
						layer.open({
							shadeClose: true,
							title: '导入追踪编码',
							content: `
							<form class="layui-form">
							  <div class="layui-form-item">
								<select id="commodityProperty" lay-filter="aihao">
									<option value="0" selected="">按订单号</option>
									<option value="1" >按商品编码</option>
								  </select>
							  </div>
							   <div class="layui-form-item">
								<label class="layui-form-label">追踪编码</label>
								<div class="layui-input-block">
								  <input type="text" name="tracingCode" id="tracingCode" lay-verify="required" placeholder="请输入追踪编码" class="layui-input">
								</div>
							  </div>
							</form>
							`,
							success: function (layero, index) {
								layui.form.render();
								layero.find('.layui-layer-content').css('overflow', 'unset');
							},
							yes: function (index, layero) {
								var tracingCode = $('#tracingCode').val();
								if (tracingCode == null || tracingCode ==undefined || tracingCode == ''){
									return layer.msg("追踪编码不允许为空!")
								}
								var commodityProperty = $('#commodityProperty').val();
								$.ajax({
									type: "POST",
									url: '/api/inter/tosPurchasePlanItemFh/dr',
									data: {id: row.id,tracingCode:tracingCode,commodityProperty:commodityProperty,orderCode:row.orderCode},
									success: function (res) {
										if (res.code == 0) {
											layer.alert(res.msg);
											setTimeout(function(){
												layer.closeAll();
												location.reload();
											}, 3000);
										} else {
											layer.alert(res.msg);
										}
									}
								});
							}
						});
					}
					break;
				}
			};
		},


		listenMenu10452: function(obj, datas) { // 库存调拨单
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl("库存调拨单 - 新增","/web/storage/tccStockAllocateNoManage/toAdd",1);
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tccStockAllocateNoManage/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},




		listenMenu20454: function(obj, datas) { // HW商品库导入详情
			var t = this;
			switch(obj.event){
				case 'event-to-exportError'://导出错误信息
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tsBatchImportLog/exportErrorByTosProductBasis',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},



		listenMenu20457: function(obj, datas) { // HW商品listing库导入详情
			var t = this;
			switch(obj.event){
				case 'event-to-exportError'://导出错误信息
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tsBatchImportLog/exportErrorByTosProductActive',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
		listenMenu20463: function(obj, datas) { // 万里汇API付款操作记录表
			var t = this;
			switch(obj.event){
				case 'LAYTABLE_EXPORT_DATA':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcwWanliTransfer/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
	    listenMenu20470: function(obj, datas) {
	    	var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					var w=($(window).width()*0.9);
					var h=($(window).height() - 50);
				    var index = layer.open({
				        type: 2,
				        area: [w+'px', h +'px'],
				        fix: true,
				        maxmin: false,
				        shadeClose: true,
				        shade:0.4,
				        title: "新增行单击列表",
				        content: '/web/sys/ysRowClickGrid/toAdd'
				    });
					break;
				}
				case 'event-to-edit':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w=($(window).width()*0.9);
						var h=($(window).height() - 50);
					    var index = layer.open({
					        type: 2,
					        area: [w+'px', h +'px'],
					        fix: true,
					        maxmin: false,
					        shadeClose: true,
					        shade:0.4,
					        title: "编辑",
					        content: '/web/sys/ysRowClickGrid/toEdit?id=' + datas[0].id
					    });
					}
					break;
				}
			};
	    },

		listenMenu20472: function(obj, datas) {//FBA计划单
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl('FBA计划单-新增',"/web/storage/tccFbaPlan/toAdd",1);
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tccFbaPlan/exportNew',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-del':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var _list = [];
						for (var i = 0; i < datas.length; i++) {
							_list[i] = datas[i].bid;
						}
						layer.confirm('确定要计划取消吗？', { icon: 3 }, function() {
							layer.msg('处理中', { icon: 16, shade: 0.01 });
							$.ajax({
								url: '/api/inter/tccFbaPlan/delete',
								data: "list=" + _list,
								type: 'POST',
								async: true,
								success: function(res) {
									if (res.code == 0) {
										layer.msg(res.msg);
										setTimeout(function(){
											layer.closeAll();
											location.reload();
										}, 3000);
									} else {
										layer.msg(res.msg);
									}
								}, error: function() {
									layer.close();
									layer.msg("操作失败，请稍后再试！", { icon: 2 });
								}
							});
						}, function() {
						});
					}
					break;
				}
				case 'event-to-flow'://FBA计划单审核
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						layer.confirm('确定要计划审核吗？', { icon: 3 }, function() {
							t.showloadings(true);
							$.ajax({
								url: '/api/inter/tccFbaPlan/flow',
								data: {id:datas[0].id},
								type: 'POST',
								async: true,
								success: function(res) {
									if (res.code == 0) {
										//自动
										if(datas[0].creationMethod == 1){
											//1按SKU自动发货
											if(datas[0].deliverState == 1){
												t.showloadings(false);
												layer.closeAll();
												var w = ($(window).width() * 0.8);
												var h = ($(window).height() * 0.8);

												layer.open({
													type: 2, area: [w + 'px', h + 'px'],
													fix: true,
													maxmin: false,
													shadeClose: true,
													shade: 0.4,
													title: "货件预览",
													content: '/web/storage/tccFbaPlan/flow?bid=' + datas[0].bid,
												});
												return
											}
										}

										layer.msg(res.msg);
										setTimeout(function(){
											t.showloadings(false);
											layer.closeAll();
											location.reload();
										}, 3000);
									} else {
										t.showloadings(false);
										layer.alert(res.msg);
									}
								}, error: function() {
									t.showloadings(false);
									layer.close();
									layer.msg("操作失败，请稍后再试！", { icon: 2 });
								}
							});
						}, function() {
						});
					}
					break;
				}
			};
		},



		listenMenu20471: function(obj, datas) {//FBA装箱单
			var t = this;
			var tableId = t.c.id_table_main;
			switch(obj.event){
				case 'event-to-distributionPrint'://配货清单打印
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						layer.msg('处理中', { icon: 16, shade: 0.01 });
						var choooseDatas = JSON.stringify(datas);
						$.ajax({
							type: "POST",
							url: '/api/inter/tccFbaBoxUp/distributionPrint',
							data: {
								choooseDatas: choooseDatas
							},
							success: function (data) {
								layer.closeAll();
								if (data.code == 0) {
									if (data.msg != undefined && data.msg.startsWith('http')) {
										window.open(data.msg);
									} else {
										layer.msg(data.msg);
									}
								} else {
									alert(data.msg);
								}
							}
						});
					}
					break;
				}
				case 'event-to-tagGoodsPrint'://商品标打印
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w = ($(window).width() * 0.9);
						var h = ($(window).height() - 50);
						var index = layer.open({
							type: 2, area: [w + 'px', h + 'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade: 0.4,
							title: "商品标打印",
							content: '/web/storage/tccFbaBoxUp/printTag?bid=' + datas[0].bid+"&printType=0"
						});
					}
					break;
				}
				case 'event-to-tagTransparentPrint'://透明标打印
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w = ($(window).width() * 0.9);
						var h = ($(window).height() - 50);
						var index = layer.open({
							type: 2, area: [w + 'px', h + 'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade: 0.4,
							title: "透明标打印",
							content: '/web/storage/tccFbaBoxUp/printTag?bid=' + datas[0].bid+"&printType=1"
						});
					}
					break;
				}
				case 'event-to-tagEurPrint'://欧代标打印
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w = ($(window).width() * 0.9);
						var h = ($(window).height() - 50);
						var index = layer.open({
							type: 2, area: [w + 'px', h + 'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade: 0.4,
							title: "欧代标打印",
							content: '/web/storage/tccFbaBoxUp/printTag?bid=' + datas[0].bid+"&printType=2"
						});
					}
					break;
				}
				case 'event-to-boxRoleStorage'://箱规编辑
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.showloadings(true)
						$.ajax({
							type: "POST",
							url: '/api/inter/tccFbaBoxUp/ifLabels',
							data: {
								bid: datas[0].bid
							},
							success: function (data) {
								layer.closeAll();
								if (data.code == 0) {
									t.showloadings(false)
									var w = ($(window).width() * 0.9);
									var h = ($(window).height() - 50);
									var index = layer.open({
										type: 2, area: [w + 'px', h + 'px'],
										fix: true,
										maxmin: false,
										shadeClose: true,
										shade: 0.4,
										title: "箱规编辑",
										content: '/web/storage/tccFbaBoxUp/boxRoleEdit?bid=' + datas[0].bid+"&tableId="+tableId+"&isSearch=0"
									});

								} else {
									t.showloadings(false)
									alert(data.msg);
								}
							}
						});

					}
					break;
				}
				case 'event-to-boxRoleBusiness'://箱规查询
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w = ($(window).width() * 0.9);
						var h = ($(window).height() - 50);
						var index = layer.open({
							type: 2, area: [w + 'px', h + 'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade: 0.4,
							title: "箱规查询",
							content: '/web/storage/tccFbaBoxUp/boxRoleEdit?bid=' + datas[0].bid+"&tableId="+tableId+"&isSearch=1"
						});
					}
					break;
				}
				case 'event-to-fbaImport'://FBA导入
				{
					if (datas.length == 0) {
						return layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						if(datas[0].creationMethod == '1'){//自动 无需导入
							return layer.alert('下单方式\'自动\'，无需导入');
						}
						var w = ($(window).width() * 0.6);
						var h = ($(window).height() * 0.4);
						//var choooseDatas = JSON.stringify(datas);
						layer.open({
							shadeClose:true,
							area: [w + 'px', h + 'px'],
							title: 'FBA导入',
							content: `
						<form class="layui-form">
						  <div class="layui-form-item">
							 <label class="layui-form-label">
								<font class="f_red">*</font>
								 FBA编号
							 </label>
							 <div class="layui-input-block">
								<input type="text" name="fbaNo" id="fbaNo" lay-verify="required" placeholder="请输入FBA编号" class="layui-input">
							 </div>
						  </div>
						  <div class="layui-form-item">
						  <label class="layui-form-label">
								<font class="f_red">*</font>
								 FBA追踪编号
							 </label>
							<div class="layui-input-block">
							  <input type="text" name="fbaTrackNo" id="fbaTrackNo" lay-verify="required" placeholder="请输入FBA追踪编号" class="layui-input">
							</div>
						  </div>
						</form>
					`,
							success: function(layero, index) {},
							yes: function (index, layero) {
								layer.msg('处理中', { icon: 16, shade: 0.01 });
								var fbaNo = $('#fbaNo').val();
								var fbaTrackNo = $('#fbaTrackNo').val();
								$.ajax({
									type: "POST",
									url: '/api/inter/tccFbaBoxUp/fbaImport',
									data: {
										bid: datas[0].bid,
										fbaNo:fbaNo,
										fbaTrackNo:fbaTrackNo
									},
									success: function (data) {
										if (data.code == 0) {
											layer.closeAll();
											layui.table.reloadData(tableId);
											layer.alert(data.msg);
										} else {
											layer.closeAll();
											layer.alert(data.msg);
										}
									}, error: function() {
										layer.close();
										layer.msg("操作失败，请稍后再试！", { icon: 2 });
									}
								});
							}
						});
						break;
					}
					break;
				}

				case 'event-to-fbaImportByBox'://FBA导入（按箱）
				{
					if (datas.length == 0) {
						return layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						if(datas[0].creationMethod == '1'){//自动 无需导入
							return layer.alert('下单方式\'自动\'，无需导入');
						}
						if(datas[0].boxState != '1' && datas[0].boxState != '3'){//已装箱状态才行
							return layer.alert('请先进行箱规编辑');
						}

						var w = ($(window).width() * 0.9);
						var h = ($(window).height() - 50);
						var index = layer.open({
							type: 2, area: [w + 'px', h + 'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade: 0.4,
							title: "FBA导入（按箱）",
							content: '/web/storage/tccFbaBoxUp/toEdit?bid='+datas[0].bid
						});


					}
					break;
				}

				case 'event-to-planCancel'://计划取消
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else{
						var boxState = datas[0].boxState;
						if(boxState=='2'){
							return  layer.alert('该装箱单已取消，无需再次取消');
						}
						if(boxState=='3'){
							return  layer.alert('该装箱单已审核，不能取消');
						}
						layer.confirm('该操作将按照FBA计划单取消，自动发货将取消后台货件计划，手动发货请自行取消后台货件计划，请确认。', { icon: 3 }, function() {
							var w = ($(window).width() * 0.9);
							var h = ($(window).height() - 50);
							var index = layer.open({
								type: 2, area: [w + 'px', h + 'px'],
								fix: true,
								maxmin: false,
								shadeClose: true,
								shade: 0.4,
								title: "取消",
								content: '/web/storage/tccFbaCancel/doCancel?bid='+datas[0].bid+"&formType=1"
							});
						}, function() {});

					}
					break;


					// if(datas.length == 0) {
					// 	layer.alert('尚未选中数据');
					// } else {
					// 	var choooseDatas = JSON.stringify(datas);
					// 	layer.confirm('该操作将按照FBA计划单取消，自动发货将取消后台货件计划，手动发货请自行取消后台货件计划，请确认。', { icon: 3 }, function() {
					// 		layer.msg('处理中', { icon: 16, shade: 0.01 });
					// 		$.ajax({
					// 			url: '/api/inter/tccFbaBoxUp/planCancel',
					// 			data: {
					// 				choooseDatas: choooseDatas
					// 			},
					// 			type: 'POST',
					// 			async: true,
					// 			success: function(res) {
					// 				if (res.code == 0) {
					// 					layer.closeAll();
					// 					layui.table.reloadData(tableId);
					// 					layer.alert(res.msg);
					// 				} else {
					// 					layer.closeAll();
					// 					layer.alert(res.msg);
					// 				}
					// 			}, error: function() {
					// 				layer.close();
					// 				layer.msg("操作失败，请稍后再试！", { icon: 2 });
					// 			}
					// 		});
					// 	}, function() {});
					// }
					// break;
				}

				/*
				case 'event-to-planCancelOperation'://计划取消（运营）
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var choooseDatas = JSON.stringify(datas);
						layer.confirm('该操作将按照FBA计划单取消，自动发货将取消后台货件计划，手动发货请自行取消后台货件计划，请确认。', { icon: 3 }, function() {
							layer.msg('处理中', { icon: 16, shade: 0.01 });
							$.ajax({
								url: '/api/inter/tccFbaBoxUp/planCancelByOperation',
								data: {
									choooseDatas: choooseDatas
								},
								type: 'POST',
								async: true,
								success: function(res) {
									console.log('res',res);
									if (res.code == 0) {
										layer.closeAll();
										layui.table.reloadData(tableId);
										layer.alert(res.msg);
									} else {
										layer.closeAll();
										layer.alert(res.msg);
									}
								}, error: function() {
									layer.close();
									layer.msg("操作失败，请稍后再试！", { icon: 2 });
								}
							});
						}, function() {});
					}
					break;
				}

				case 'event-to-logisticsDetail'://物流方式详情
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl("物流方式详情","/web/storage/tccFbaPlan/toEditWl?bid="+datas[0].bidFbaPlan,1);
					}
					break;
				}


				case 'event-to-editLogisticsMethod'://物流服务名称修改
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						window.matchValuesAfterModalSelectRadio = function(colCode, data, extraData) {
							console.log('data =',data);
							var chooseId = data.id;
							layui.layer.msg('处理中', {icon: 16,shade: 0.01});
							$.ajax({
								url: '/api/inter/tccFbaBoxUp/editLogisticsMethod',
								data: {bid:datas[0].bid,logisticsMethodId:chooseId},
								type: 'POST',
								async: false,
								success: function (result) {
									if(result.code=='0'){
										layer.closeAll();
										layui.table.reloadData(tableId);
										layer.alert(result.msg);
										//return;
									}else {//失败
										layer.closeAll();
										layer.alert(result.msg);
									}
								},
								error: function () {
									layer.close();
									layer.msg("新增失败，请稍后再试！", {icon: 2});
								}
							});
						};
						layui.YsModal.init({
							modalKey: 'TCC_LogisticsMethodFbaPlan',
							colCode: 'aaaa',
							parentObj: window,
							extraData:{},
							conditionsDefault: [],
							sameCode: 'xx',
							pathGridRequest: '/api/inter/tccLogisticsMethod/searchFbaPlan?shopId='+datas[0].shopId
						});
					}
					break;
				}
				 */


				case'event-to-chooseIdea'://确认方案
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						if(datas[0].creationMethod == '1' && datas[0].deliverState == '0') {//自动 && 按箱自动发货
							//验证
							$.ajax({
								url: '/api/inter/tccFbaBoxUp/chooseIdeaByCheck',
								data: {
									bidFbaPlan: datas[0].bidFbaPlan,
									bid: datas[0].bid
								},
								type: 'POST',
								async: true,
								success: function(res) {
									layer.closeAll();
									if (res.code == 0) {
										// var isReCountPurchaseAmount = 1;
										// if(res.msg=='pass'){//无需重新计算采购价
										// 	isReCountPurchaseAmount = 0;
										// }

										//跳转 货件预览页面
										var w = ($(window).width() * 0.9);
										var h = ($(window).height() - 50);
										var index = layer.open({
											type: 2, area: [w + 'px', h + 'px'],
											fix: true,
											maxmin: false,
											shadeClose: true,
											shade: 0.4,
											title: "货件预览",
											//content: '/web/storage/tccFbaBoxUp/shipmentPreview?bid=' + datas[0].bid+'&isReCountPurchaseAmount='+isReCountPurchaseAmount+"&tableId="+tableId
											content: '/web/storage/tccFbaBoxUp/shipmentPreview?bid=' + datas[0].bid+"&tableId="+tableId
										});

									} else {
										layer.alert(res.msg);
									}
								}, error: function() {
									layer.closeAll();
									layer.alert("操作失败，请稍后再试！", { icon: 2 });
								}
							});
						}else {//手动 || 自动 * 按SKU自动发货
							layer.alert("只有下单方式为\'自动\'的才需要进行方案的选择！", { icon: 2 });
						}

					}

					break;
				}

				case 'event-to-examine'://装箱审核
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						//var choooseDatas = JSON.stringify(datas);
						layer.confirm('确定要装箱审核所选择的数据？', { icon: 3 }, function() {
							layer.msg('处理中', { icon: 16, shade: 0.01 });
							//creationMethod 下单方式(0.手动|1.自动)
							//deliverState 发货计划（1按SKU自动发货，0按箱自动发货）
							//console.log('datas[0]',datas[0]);
							if(datas[0].creationMethod == '1' && datas[0].deliverState == '0') {//自动 && 按箱自动发货
								//验证
								$.ajax({
									url: '/api/inter/tccFbaBoxUp/examineAutoByCheck',
									data: {
										bidFbaPlan: datas[0].bidFbaPlan,
										bid: datas[0].bid
									},
									type: 'POST',
									async: true,
									success: function(res) {
										layer.closeAll();
										if (res.code == 0) {
											var isReCountPurchaseAmount = 1;
											if(res.msg=='pass'){//无需重新计算采购价
												isReCountPurchaseAmount = 0;
											}
											if(isReCountPurchaseAmount == 1){//要重新计算采购价
												layer.confirm(res.msg, { icon: 3 }, function() {
													layer.load(0);
													$.ajax({
														url: '/api/inter/tccFbaBoxUp/examineByAuto',
														data: {
															isReCountPurchaseAmount: isReCountPurchaseAmount,
															bid: datas[0].bid
														},
														type: 'POST',
														async: true,
														success: function(res) {
															layer.closeAll();
															if (res.code == 0) {
																layui.table.reloadData(tableId);
																layer.alert(res.msg);
															} else {
																layer.alert(res.msg);
															}
														}, error: function() {
															layer.closeAll();
															layer.alert("操作失败，请稍后再试！", { icon: 2 });
														}
													});

												}, function() {});
											}else{
												layer.load(0);
												$.ajax({
													url: '/api/inter/tccFbaBoxUp/examineByAuto',
													data: {
														isReCountPurchaseAmount: isReCountPurchaseAmount,
														bid: datas[0].bid
													},
													type: 'POST',
													async: true,
													success: function(res) {
														layer.closeAll();
														if (res.code == 0) {
															layui.table.reloadData(tableId);
															layer.alert(res.msg);
														} else {
															layer.alert(res.msg);
														}
													}, error: function() {
														layer.closeAll();
														layer.alert("操作失败，请稍后再试！", { icon: 2 });
													}
												});
											}




										} else {
											layer.alert(res.msg);
										}
									}, error: function() {
										layer.closeAll();
										layer.alert("操作失败，请稍后再试！", { icon: 2 });
									}
								});




							}else {//手动 || 自动 * 按SKU自动发货
								$.ajax({
									url: '/api/inter/tccFbaBoxUp/examine',
									data: {
										bidFbaPlan: datas[0].bidFbaPlan,
										bid: datas[0].bid
									},
									type: 'POST',
									async: true,
									success: function(res) {
										layer.closeAll();
										if (res.code == 0) {
											layui.table.reloadData(tableId);
											layer.alert(res.msg);
										} else {
											layer.alert(res.msg);
										}
									}, error: function() {
										layer.closeAll();
										layer.alert("操作失败，请稍后再试！", { icon: 2 });
									}
								});
							}

						}, function() {});
					}

					break;
				}

				case 'event-to-export'://导出
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tccFbaBoxUp/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}


				case 'event-to-updateFbaWarehouse'://修改FBA仓库
				{
					if (datas.length == 0) {
						return layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						if(datas[0].creationMethod == '1'){//自动 无需导入
							return layer.alert('下单方式\'自动\'，无需修改FBA仓库');
						}

						var w = ($(window).width() * 0.9);
						var h = ($(window).height() - 50);
						var index = layer.open({
							type: 2, area: [w + 'px', h + 'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade: 0.4,
							title: "修改FBA仓库",
							content: '/web/storage/tccFbaBoxUp/updateFbaWarehouse?bid='+datas[0].bid
						});


					}
					break;
				}


				case 'event-to-planCancelSearch'://计划取消查询
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w = ($(window).width() * 0.9);
						var h = ($(window).height() - 50);
						var index = layer.open({
							type: 2, area: [w + 'px', h + 'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade: 0.4,
							title: "计划取消查询",
							content: '/web/storage/tccFbaCancel/doCancelBySearch?bid='+datas[0].bid+"&formType=1"
						});
					}
					break;
				}


			};
		},

		listenMenu20474: function(obj, datas) {//FBA发货单(内嵌不展示)
			var t = this;
			switch(obj.event){
				case 'event-to-del'://计划取消
				{
					if (datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if (datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var status = datas[0].status;
						if (status == '0') {
							return layer.alert('该发货单已取消，无需再次取消');
						}
						if (status == '2') {
							return layer.alert('该发货单已审核，不能取消');
						}
						if (status == '3') {
							return layer.alert('该发货单已取消，不能取消');
						}
						if (status == '4') {
							return layer.alert('该发货单待发货中，不能取消');
						}
						if (status == '5') {
							return layer.alert('该发货单已发货，不能取消');
						}
						layer.confirm('该操作将按照FBA计划单取消，自动发货将取消后台货件计划，手动发货请自行取消后台货件计划，请确认。', {icon: 3}, function () {
							var w = ($(window).width() * 0.9);
							var h = ($(window).height() - 50);
							var index = layer.open({
								type: 2, area: [w + 'px', h + 'px'],
								fix: true,
								maxmin: false,
								shadeClose: true,
								shade: 0.4,
								title: "取消",
								content: '/web/storage/tccFbaCancel/doCancel?bid=' + datas[0].fbaplanBid + "&formType=2"
							});

						}, function () {
						});

					}
					break;
				}
				case 'event-to-flow'://转运审核
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					}else {
						layer.confirm('确定要转运审核所选择的数据？', { icon: 3 }, function() {
							var choooseDatas = JSON.stringify(datas);
							t.showloadings(true);
							$.ajax({
								url: '/api/inter/tccFbaDeliver/flow',
								data: {choooseDatas: choooseDatas},
								type: 'POST',
								async: true,
								success: function(res) {
									if (res.code == 0) {
										t.showloadings(false);
										layer.msg(res.msg);
										setTimeout(function(){
											layer.closeAll();
											location.reload();
										}, 3000);
									} else {
										t.showloadings(false);
										layer.alert(res.msg);
									}
								}, error: function() {
									t.showloadings(false);
									layer.close();
									layer.alert("转运审核失败，请稍后再试！", { icon: 2 });
								}
							});
						}, function() {
							t.showloadings(false);
						});
					}
					break;
				}
				case 'event-to-wl'://FBA发货物流方式详情
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					}else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					}else {
						t.openUrl("FBA发货物流方式详情","/web/storage/tccFbaDeliver/toEditWl?bid="+datas[0].bid,1);
					}
					break;
				}
				case 'event-to-fy'://FBA发货实际费用详情
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					}else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					}else {
						t.openUrl("FBA发货实际费用详情","/web/storage/tccFbaDeliver/toEditFee?bid="+datas[0].bid,1);
					}
					break;
				}

				case 'event-to-wlxg'://物流服务名称修改
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						window.matchValuesAfterModalSelectRadio = function(colCode, data, extraData) {
							var chooseId = data.id;
							t.showloadings(true);
							$.ajax({
								url: '/api/inter/tccFbaDeliver/editLogisticsMethod',
								data: {bid:datas[0].bid,logisticsMethodId:chooseId,isType:null},
								type: 'POST',
								async: true,
								success: function(res) {
									if (res.code == 0) {
										if (res.msg != '操作成功') {
											layer.confirm(res.msg, {icon: 3}, function () {
												$.ajax({
													url: '/api/inter/tccFbaDeliver/editLogisticsMethod',
													data: {bid:datas[0].bid,logisticsMethodId:chooseId,isType:1},
													type: 'POST',
													async: true,
													success: function(res) {
														if (res.code == 0) {
															layer.msg(res.msg);
															setTimeout(function () {
																layer.closeAll();
																location.reload();
																t.showloadings(false);
															}, 3000);
														} else {
															layer.alert(res.msg);
														}
													}, error: function() {
														layer.close();
														layer.alert("变更物流服务失败，请稍后再试！", { icon: 2 });
													}

												});
											}, function() {
												t.showloadings(false);
											});
										} else {
											layer.msg(res.msg);
											setTimeout(function () {
												layer.closeAll();
												location.reload();
												t.showloadings(false);
											}, 3000);
										}
									} else {
										t.showloadings(false);
										layer.alert(res.msg);
									}
								}, error: function() {
									layer.close();
									t.showloadings(false);
									layer.alert("变更物流服务失败，请稍后再试！", { icon: 2 });
								}

							});
						};
						layui.YsModal.init({
							modalKey: 'TCC_LogisticsMethodFbaPlan',
							colCode: 'aaaa',
							parentObj: window,
							extraData:{},
							conditionsDefault: [],
							sameCode: 'xx',
							pathGridRequest: '/api/inter/tccLogisticsMethod/searchFbaPlan?shopId='+datas[0].shopId+"&vgsbm="+datas[0].vgsbm+"&warehouseCode="+datas[0].fbaWarehouse
						});
					}
					break;
				}


				case 'event-to-updateFbaWarehouse'://修改FBA仓库
				{
					if (datas.length == 0) {
						return layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w = ($(window).width() * 0.9);
						var h = ($(window).height() - 50);
						var index = layer.open({
							type: 2, area: [w + 'px', h + 'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade: 0.4,
							title: "修改FBA仓库",
							content: '/web/storage/tccFbaBoxUp/updateFbaWarehouse?bid='+datas[0].boxUpBid
						});


					}
					break;
				}

				case 'event-to-planCancelSearch'://计划取消查询
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w = ($(window).width() * 0.9);
						var h = ($(window).height() - 50);
						var index = layer.open({
							type: 2, area: [w + 'px', h + 'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade: 0.4,
							title: "计划取消查询",
							content: '/web/storage/tccFbaCancel/doCancelBySearch?bid=' + datas[0].fbaplanBid + "&formType=2"
						});
					}
					break;
				}




			};
		},

		listenMenu20477: function(obj, datas) {//FBA完成单(内嵌不展示)
			var t = this;
			switch(obj.event){
				case 'event-to-del'://计划取消
				{
					if (datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if (datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var status = datas[0].status;
						if (status == '0') {
							return layer.alert('该发货单已取消，无需再次取消');
						}
						if (status == '3') {
							return layer.alert('该发货单已取消，不能取消');
						}
						if (status == '4') {
							return layer.alert('该发货单待发货中，不能取消');
						}
						if (status == '5') {
							return layer.alert('该发货单已发货，不能取消');
						}
						layer.confirm('该操作将按照FBA计划单取消，自动发货将取消后台货件计划，手动发货请自行取消后台货件计划，请确认。', {icon: 3}, function () {
							var w = ($(window).width() * 0.9);
							var h = ($(window).height() - 50);
							var index = layer.open({
								type: 2, area: [w + 'px', h + 'px'],
								fix: true,
								maxmin: false,
								shadeClose: true,
								shade: 0.4,
								title: "取消",
								content: '/web/storage/tccFbaCancel/doCancel?bid=' + datas[0].fbaplanBid + "&formType=3"
							});

						}, function () {
						});

					}
					break;
				}
				case 'event-to-wl'://FBA发货物流方式详情
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					}else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					}else {
						t.openUrl("FBA发货物流方式详情","/web/storage/tccFbaDeliver/toEditWl?bid="+datas[0].bid,1);
					}
					break;
				}
				case 'event-to-fy'://FBA发货实际费用详情
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					}else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					}else {
						t.openUrl("FBA发货实际费用详情","/web/storage/tccFbaDeliver/toEditFee?bid="+datas[0].bid,1);
					}
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tccFbaDeliver/exportWc',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				// 箱标打印
				case 'event-to-printing':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					}  else {
						var _list = [];
						for (var i = 0; i < datas.length; i++) {
							_list[i] = datas[i].id;
						}

						layer.confirm('确定箱标打印？', { icon: 3 }, function() {
							layer.msg('处理中', { icon: 16, shade: 0.01 });
							$.ajax({
								url: '/api/inter/tccFbaDeliver/printing',
								data: "list=" + _list,
								type: 'POST',
								async: true,
								success: function(res) {
									if (res.code == 0) {
										for (let i = 0; i < res.data.length; i++) {
											var urlPdf = res.data[i].data; // 拼接PDF的完整路径
											var dataOther = res.data[i].dataOther; // 拼接PDF的完整路径
											var json = {};
											json.action = "previewfile";   //打印指令动作。json.action = "preview"，则生成预览。
											json.format = "pdf_url";        //指定格式为pdf_url。
											json.docwidth = 20; // 单位：cm
											json.doclength = 30; // 单位：cm

											json.paperwidth = 10;
											json.paperlength = 10;

											json.content =  [dataOther,urlPdf,urlPdf,urlPdf,urlPdf];   //pdf文件的url路径
											// json.cert = window.location.href.split("/web")[0] + "/static/plugins/printWorld/pdf_mini-ease.com.ctf";
											json.cert = "https://file.mini-ease.com/upload/nomodule/202412/13/163232652.ctf";
											var pw = GetPrintWorld();    //获取打天下对象
											pw.Act(json);
										}
										location.reload();

									} else {
										layer.close();
										layer.msg(res.msg);
									}
								}, error: function() {
									layer.close();
									layer.msg("打印失败，请稍后再试！", { icon: 2 });
								}
							});
						}, function() {
						});
					}
					break;
				}
				case 'event-to-wlxgWc'://物流服务名称修改 20250411增加功能
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else if(datas[0]._ys_status != 2) {
						debugger
						layer.alert('物流服务变更只允许已转运操作,请核实后再操作!');
					} else {
						window.matchValuesAfterModalSelectRadio = function(colCode, data, extraData) {
							var chooseId = data.id;
							t.showloadings(true);
							$.ajax({
								url: '/api/inter/tccFbaDeliver/editLogisticsMethodWc',
								data: {bid:datas[0].bid,logisticsMethodId:chooseId,isType:null},
								type: 'POST',
								async: true,
								success: function(res) {
									if (res.code == 0) {
										if (res.msg != '操作成功') {
											layer.confirm(res.msg, {icon: 3}, function () {
												$.ajax({
													url: '/api/inter/tccFbaDeliver/editLogisticsMethodWc',
													data: {bid:datas[0].bid,logisticsMethodId:chooseId,isType:1},
													type: 'POST',
													async: true,
													success: function(res) {
														if (res.code == 0) {
															layer.msg(res.msg);
															setTimeout(function () {
																layer.closeAll();
																location.reload();
																t.showloadings(false);
															}, 3000);
														} else {
															layer.alert(res.msg);
														}
													}, error: function() {
														layer.close();
														layer.alert("变更物流服务失败，请稍后再试！", { icon: 2 });
													}

												});
											}, function() {
												t.showloadings(false);
											});
										} else {
											layer.msg(res.msg);
											setTimeout(function () {
												layer.closeAll();
												location.reload();
												t.showloadings(false);
											}, 3000);
										}
									} else {
										t.showloadings(false);
										layer.alert(res.msg);
									}
								}, error: function() {
									layer.close();
									t.showloadings(false);
									layer.alert("变更物流服务失败，请稍后再试！", { icon: 2 });
								}

							});
						};
						layui.YsModal.init({
							modalKey: 'TCC_LogisticsMethodFbaPlan',
							colCode: 'aaaa',
							parentObj: window,
							extraData:{},
							conditionsDefault: [],
							sameCode: 'xx',
							pathGridRequest: '/api/inter/tccLogisticsMethod/searchFbaPlan?shopId='+datas[0].shopId+"&vgsbm="+datas[0].vgsbm+"&warehouseCode="+datas[0].fbaWarehouse
						});
					}
					break;
				}
				case 'event-to-updateFbaWarehouse'://修改FBA仓库
				{
					if (datas.length == 0) {
						return layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w = ($(window).width() * 0.9);
						var h = ($(window).height() - 50);
						var index = layer.open({
							type: 2, area: [w + 'px', h + 'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade: 0.4,
							title: "修改FBA仓库",
							content: '/web/storage/tccFbaBoxUp/updateFbaWarehouse?bid='+datas[0].boxUpBid
						});


					}
					break;
				}

				case 'event-to-planCancelSearch'://计划取消查询
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						var w = ($(window).width() * 0.9);
						var h = ($(window).height() - 50);
						var index = layer.open({
							type: 2, area: [w + 'px', h + 'px'],
							fix: true,
							maxmin: false,
							shadeClose: true,
							shade: 0.4,
							title: "计划取消查询",
							content: '/web/storage/tccFbaCancel/doCancelBySearch?bid=' + datas[0].fbaplanBid + "&formType=3"
						});
					}
					break;
				}


			};
		},
		listenMenu20480: function(obj, datas) {//物流渠道维护
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl('物流渠道维护-新增',"/web/storage/tccLogisticsChannelMaint/toAdd",1);
					break;
				}
				case 'event-to-edit':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl("物流渠道维护 - 编辑","/web/storage/tccLogisticsChannelMaint/toEdit?id="+ datas[0].id,1);
					}
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tccLogisticsChannelMaint/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
		listenMenu20482: function(obj, datas) {//物流渠道详情
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl('物流渠道详情-新增',"/web/storage/tccLogisticsChannelDetail/toAdd",1);
					break;
				}
				case 'event-to-edit':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl("物流渠道详情 - 编辑","/web/storage/tccLogisticsChannelDetail/toEdit?id="+ datas[0].id,1);
					}
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcccLogisticsChannelDetail/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},
		listenMenu20484: function(obj, datas) {//物流服务商
			var t = this;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl('物流服务商-新增',"/web/storage/tccLogisticsServiceProvider/toAdd",1);
					break;
				}
				case 'event-to-edit':
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						t.openUrl("物流服务商 - 编辑","/web/storage/tccLogisticsServiceProvider/toEdit?id="+ datas[0].id,1);
					}
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tccLogisticsServiceProvider/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},


		listenMenu20479: function(obj, datas) {//物流计划单(内嵌不展示)
			var t = this;
			var tableId = t.c.id_table_main;
			switch(obj.event) {
				case 'event-to-ssmark'://单独发货标记
				{
					if (datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var choooseDatas = JSON.stringify(datas);
						var infoItems = JSON.parse(choooseDatas);
						if (infoItems.some(item => item.status != 1)) {
							layer.msg("只允许物流状态为空的数据,请核实后在操作!");
							return;
						}
						var _list = [];
						for (var i = 0; i < datas.length; i++) {
							_list[i] = datas[i].fbaDeliverId;
						}
						layer.confirm('确定单独发货标记？', {icon: 3}, function () {
							t.showloadings(true);
							$.ajax({
								url: '/api/inter/tccLogisticsPlan/ssmark',
								data: "list=" + _list,
								type: 'POST',
								async: true,
								success: function (res) {
									if (res.code == 0) {
										t.showloadings(false);
										if (res.data.isRepetition == "true"){
											layer.confirm('勾选的发货单中，存在需拼票的货件，请知晓；', {icon: 3}, function () {
												//选择渠道
												if (res.data.isChannel == "true"){
													var w = ($(window).width() * 0.9);
													var h = ($(window).height() - 50);
													var index = layer.open({
														type: 2, area: [w + 'px', h + 'px'],
														fix: true,
														maxmin: false,
														shadeClose: true,
														shade: 0.4,
														title: "选择物流渠道名称",
														content: '/web/storage/tccLogisticsChannelMaint/toEditPlan?cck=' + res.data.cck
															+'&country=' + res.data.destinationCountryCode
															+'&transportationId=' + res.data.transportationId
															+'&nameLogsticsClearance=' + res.data.nameLogsticsClearance
															+'&list=' + _list
													});
												}else {
													//不需要选择物流渠道
													$.ajax({
														url: '/api/inter/tccLogisticsPlan/ssmarkNew1',
														data: "list=" + _list,
														type: 'POST',
														async: true,
														success: function (res) {
															if (res.code == 0) {
																layer.msg(res.msg);
																setTimeout(function(){
																	t.showloadings(false);
																	location.reload();
																}, 3000);
															} else {
																t.showloadings(false);
																layer.msg(res.msg);
															}
														}, error: function () {
															layer.close();
															layer.msg("单独发货标记失败，请稍后再试！", {icon: 2});
														}
													});
												}
											}, function () {
											});
										}else {
											//选择渠道
											if (res.data.isChannel == "true"){
												var w = ($(window).width() * 0.9);
												var h = ($(window).height() - 50);
												var index = layer.open({
													type: 2, area: [w + 'px', h + 'px'],
													fix: true,
													maxmin: false,
													shadeClose: true,
													shade: 0.4,
													title: "选择物流渠道名称",
													content: '/web/storage/tccLogisticsChannelMaint/toEditPlan?cck=' + res.data.cck
														+'&country=' + res.data.destinationCountryCode
														+'&transportationId=' + res.data.transportationId
														+'&nameLogsticsClearance=' + res.data.nameLogsticsClearance
														+'&list=' + _list
												});
											}else {
												//不需要选择物流渠道
												$.ajax({
													url: '/api/inter/tccLogisticsPlan/ssmarkNew1',
													data: "list=" + _list,
													type: 'POST',
													async: true,
													success: function (res) {
														if (res.code == 0) {
															layer.msg(res.msg);
															setTimeout(function(){
																t.showloadings(false);
																location.reload();
															}, 3000);
														} else {
															t.showloadings(false);
															layer.msg(res.msg);
														}
													}, error: function () {
														layer.close();
														layer.msg("单独发货标记失败，请稍后再试！", {icon: 2});
													}
												});
											}
										}
									} else {
										t.showloadings(false);
										layer.msg(res.msg);
									}
								}, error: function () {
									layer.close();
									layer.msg("单独发货标记失败，请稍后再试！", {icon: 2});
								}
							});
						}, function () {
						});
					}
					break;
				}

				case 'event-to-ppMark'://拼票发货标记
				{
					if (datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var choooseDatas = JSON.stringify(datas);
						var infoItems = JSON.parse(choooseDatas);
						if (infoItems.some(item => item.status != 1)) {
							layer.msg("只允许物流状态为空的数据,请核实后在操作!");
							return;
						}
						var _list = [];
						for (var i = 0; i < datas.length; i++) {
							_list[i] = datas[i].fbaDeliverId;
						}

						layer.confirm('确定拼票发货标记？', {icon: 3}, function () {
							$.ajax({
								url: '/api/inter/tccLogisticsPlan/ppMark',
								data: "list=" + _list,
								type: 'POST',
								async: true,
								success: function (res) {
									if (res.code == 0) {
										t.c.gridObj.c.isLoadRowClick = false; // 是否已经加载单击子列表
										var w = ($(window).width() * 0.9);
										var h = ($(window).height() - 50);
										var index = layer.open({
											type: 2, area: [w + 'px', h + 'px'],
											fix: true,
											maxmin: false,
											shadeClose: true,
											shade: 0.4,
											title: "拼票预测",
											content: '/web/storage/tccLogisticsChannelMaint/toEditPlanTicket?cck=' + res.data.cck
												+'&country=' + res.data.destinationCountryCode
												+'&transportationId=' + res.data.transportationId
												+'&nameLogsticsClearance=' + res.data.nameLogsticsClearance
												+'&fbaWarehouseAddr=' + res.data.fbaWarehouseAddr
												+'&list=' + _list
												+'&tableId=' + tableId
										});
									} else {
										layer.msg(res.msg);
									}
								}, error: function () {
									layer.close();
									layer.msg("拼票发货标记失败，请稍后再试！", {icon: 2});
								}
							});
						}, function () {
						});
					}
					break;
				}

				case 'event-to-cxmark'://重新发货标记
				{
					if (datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var choooseDatas = JSON.stringify(datas);
						var infoItems = JSON.parse(choooseDatas);
						if (infoItems.some(item => item.status != 1)) {
							layer.msg("只允许物流状态为空的数据,请核实后在操作!");
							return;
						}
						if (infoItems.some(item => item.logInvoiceNo == null)) {
							layer.msg("勾选的数据中存在物流发票号为空的数据，不允许重新发货标记,请核实后在操作!");
							return;
						}

						var _list = [];
						for (var i = 0; i < datas.length; i++) {
							_list[i] = datas[i].logInvoiceNo;
						}
						layer.confirm('确定重新发货标记？', {icon: 3}, function () {
							t.showloadings(true);
							$.ajax({
								url: '/api/inter/tccLogisticsPlan/cxmark',
								data: "list=" + _list,
								type: 'POST',
								async: true,
								success: function (res) {
									if (res.code == 0) {
										layer.msg(res.msg);
										setTimeout(function(){
											t.showloadings(false);
											location.reload();
										}, 1000);
									} else {
										t.showloadings(false);
										layer.msg(res.msg);
									}
								}, error: function () {
									layer.close();
									layer.msg("重新发货标记失败，请稍后再试！", {icon: 2});
								}
							});
						}, function () {
						});
					}
					break;
				}

				case 'event-to-qxPlan'://物流计划取消
				{
					if (datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var choooseDatas = JSON.stringify(datas);
						var infoItems = JSON.parse(choooseDatas);
						if (infoItems.some(item => item.status != 1)) {
							layer.msg("只允许物流状态为空的数据,请核实后在操作!");
							return;
						}
						if (infoItems.some(item => item.logInvoiceNo != null)) {
							layer.msg("勾选的数据中存在物流发票号为空的数据，不允许物流计划取消,请核实后在操作!");
							return;
						}

						var _list = [];
						for (var i = 0; i < datas.length; i++) {
							_list[i] = datas[i].fbaDeliverBid;
						}
						layer.confirm('确定物流计划取消？', {icon: 3}, function () {
							t.showloadings(true);
							$.ajax({
								url: '/api/inter/tccLogisticsPlan/qxPlan',
								data: "list=" + _list,
								type: 'POST',
								async: true,
								success: function (res) {
									if (res.code == 0) {
										layer.msg(res.msg);
										setTimeout(function(){
											t.showloadings(false);
											location.reload();
										}, 1000);
									} else {
										t.showloadings(false);
										layer.msg(res.msg);
									}
								}, error: function () {
									layer.close();
									layer.msg("物流计划取消失败，请稍后再试！", {icon: 2});
								}
							});
						}, function () {
						});
					}
					break;
				}

				case 'event-to-cOrder'://物流订单生成
				{
					if (datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var choooseDatas = JSON.stringify(datas);
						var infoItems = JSON.parse(choooseDatas);
						if (infoItems.some(item => item.logInvoiceNo == null || item.logChannelName == null)) {
							layer.msg("存在未进行发货标记的数据，请确认!");
							return;
						}
						if (infoItems.some(item => item.status != 1)) {
							layer.msg("只允许物流状态为空的数据,请核实后在操作!");
							return;
						}
						var logChannelNameSet = new Set();
						var freightMethod;
						var _list = [];
						for (var i = 0; i < datas.length; i++) {
							_list[i] = datas[i].logInvoiceNo;
							logChannelNameSet.add(datas[i].logChannelName);
							freightMethod = datas[i].freightMethod;
						}

						if (logChannelNameSet.size > 1){
							return layer.alert('选择的物流渠道必须一致!');
						}
						if (freightMethod == 0) {
							var w = ($(window).width() * 0.3);
							var h = ($(window).height() * 0.3);
							layer.open({
								shadeClose: true,
								area: [w + 'px', h + 'px'],
								title: '物流标记',
								content: `
								<form class="layui-form">		
								  <div class="layui-form-item">
									<label class="layui-form-label"><i style="color:red">*</i>物流标记号</label>
									<div class="layui-input-block">
									  <input type="text" name="logisticsMarkingBid" id="logisticsMarkingBid" lay-verify="required" placeholder="请输入物流标记号" class="layui-input">
									</div>
								  </div>
								</form>
							`,
								success: function (layero, index) {
								},
								yes: function (index, layero) {
									var logisticsMarkingBid = $('#logisticsMarkingBid').val().trim();
									if (logisticsMarkingBid.replace(/(^\s*)|(\s*$)/g, "") == "") {
										return layer.msg("请填写物流标记号!")
									}
									t.showloadings(true);

									$.ajax({
										url: '/api/inter/tccLogisticsPlan/cOrder',
										data: "list=" + _list + "&logisticsMarkingBid=" + logisticsMarkingBid,
										type: 'POST',
										success: function (data) {
											if (data.code == 0) {
												layer.msg(data.msg);
												setTimeout(function () {
													t.showloadings(false);
													layer.closeAll();
													location.reload();
												}, 3000);
											} else {
												layer.closeAll();
												layer.alert(data.msg);
											}
										}
									});
								}
							});
						}else {
							layer.confirm('确定物流订单生成？', {icon: 3}, function () {
								t.showloadings(true);
								$.ajax({
									url: '/api/inter/tccLogisticsPlan/cOrder',
									data: "list=" + _list,
									type: 'POST',
									async: true,
									success: function (res) {
										if (res.code == 0) {
											layer.msg(res.msg);
											setTimeout(function () {
												t.showloadings(false);
												location.reload();
											}, 2000);
										} else {
											t.showloadings(false);
											layer.msg(res.msg);
										}
									}, error: function () {
										layer.close();
										layer.msg("物流订单生成失败，请稍后再试！", {icon: 2});
									}
								});
							}, function () {
							});
						}
					}
					break;
				}
			}
		},



		listenMenu20481: function(obj, datas) {//物流订单(内嵌不显示)
			var t = this;
			var tableId = t.c.id_table_main;
			switch(obj.event){
				case 'event-to-channelDetail'://物流渠道详情
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						if(datas[0].logInvoiceWeight==null || datas[0].logInvoiceWeight==''){
							return layer.alert('请先进行按单收费核算');
						}
						t.openUrl("物流渠道详情","/web/storage/tccLogisticsChannelDetail/toDetail?logInvoiceNo="+ datas[0].logInvoiceNo,1);
					}
					break;
				}
                case 'event-to-channelFeeDetail'://物流渠道费用详情
                {
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						if(datas[0].logInvoiceWeight==null || datas[0].logInvoiceWeight==''){
							return layer.alert('请先进行按单收费核算');
						}
						t.openUrl("物流渠道费用详情","/web/storage/tccLogisticsDetailChannelFee/toDetail?logInvoiceNo="+ datas[0].logInvoiceNo,1);
					}
                    break;
                }
                case 'event-to-invoiceExport'://物流发票导出
                {
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var choooseDatas = JSON.stringify(datas);
						$.ajax({
							type: "POST",
							url: '/api/inter/tccLogisticsComprehensiveOrder/invoiceExport',
							data: {'choooseDatas':choooseDatas},
							success: function (data) {
								if (data.code == 0) {
									if(data.msg != undefined && data.msg.startsWith('http')) {
										window.open(data.msg);
									} else {
										layer.msg(data.msg);
									}
								} else {
									alert(data.msg);
								}
							}
						});
					}
                    break;
                }
                case 'event-to-confirm'://物流确认下单
                {
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					}  else {
						var choooseDatas = JSON.stringify(datas);

						layer.confirm('确定要下单所选的数据吗？', { icon: 3 }, function() {
							layer.msg('处理中', { icon: 16, shade: 0.01,time:false });
							$.ajax({
								url: '/api/inter/tccLogisticsComprehensiveOrder/confirm',
								data: {'choooseDatas':choooseDatas},
								type: 'POST',
								async: true,
								success: function(res) {
									if (res.code == 0) {
										layer.closeAll();
										layui.table.reloadData(tableId);
										layer.alert(res.msg);
									} else {
										layer.closeAll();
										layer.alert(res.msg);
									}
								}, error: function() {
									layer.close();
									layer.alert("打印失败，请稍后再试！", { icon: 2 });
								}
							});
						}, function() {
						});
					}

                    break;
                }
                case 'event-to-locationImport'://物流信息导入
                {
					t.openImport(20481); // 导入的菜单ID
                    break;
                }
				case 'event-to-trackingSearch'://物流轨迹查询
				{
					if (datas.length == 0) {
						return layer.alert('尚未选中数据');
					} else if (datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						layer.msg('处理中', { icon: 16, shade: 0.01 });
						$.ajax({
							type: "POST",
							url: '/api/inter/tccLogisticsComprehensiveOrder/trackingSearch',
							data: {logInvoiceNo: datas[0].logInvoiceNo},
							success: function (res) {
								console.log('res',res);
								layer.close();
								if(res.code==0 && res.data){
									var dataInfo = res.data;
									var str = '<ul class="layui-timeline" style="padding:10px 20px;">';
									for (var i = 0; i < dataInfo.length; i++) {
										str += `<li class="layui-timeline-item">
											  <i class="layui-icon layui-timeline-axis"></i>
											  <div class="layui-timeline-content layui-text">
												<h3 class="layui-timeline-title">${dataInfo[i].acceptTime}</h3>
												<p>${dataInfo[i].remark}</p>
											  </div>
											</li>`;
									}
									str += '</ul>';
									layer.open({
										type: 1,
										title: '物流轨迹',
										area: ['700px', '500px'], //宽高
										content: str
									});
								}else{
									layer.alert('暂无物流轨迹')
								}
							}, error: function() {
								layer.close();
								layer.alert("操作失败，请稍后再试！", { icon: 2 });
							}
						});
						break;
					}
					break;
				}

                case 'event-to-importC88'://C88文件批量上传
                {
					var w = ($(window).width() * 0.9);
					var h = ($(window).height() - 50);
					var index = layer.open({
						type: 2, area: [w + 'px', h + 'px'],
						fix: true,
						maxmin: false,
						shadeClose: true,
						shade: 0.4,
						title: "C88文件批量上传",
						content: '/web/storage/tccLogisticsComprehensiveOrder/importFileC88Batch?tableId='+tableId+'&isEdit=1&isByFbaNoImport=0&fbaNo=0'
					});
                    break;
                }

                case 'event-to-cancelOrder'://物流订单取消
                {
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					}  else {
						var choooseDatas = JSON.stringify(datas);

						layer.confirm('物流订单非特殊情况不能随意取消，请确认！', { icon: 3 }, function() {
							layer.msg('处理中', { icon: 16, shade: 0.01,time:false });
							$.ajax({
								url: '/api/inter/tccLogisticsComprehensiveOrder/cancelOrder',
								data: {'choooseDatas':choooseDatas},
								type: 'POST',
								async: true,
								success: function(res) {
									if (res.code == 0) {
										layer.closeAll();
										layui.table.reloadData(tableId);
										layer.alert(res.msg);
									} else {
										layer.closeAll();
										layer.alert(res.msg);
									}
								}, error: function() {
									layer.close();
									layer.msg("打印失败，请稍后再试！", { icon: 2 });
								}
							});
						}, function() {
						});
					}
					break;
                }
                case 'event-to-export'://导出
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tccLogisticsComprehensiveOrder/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-apiPlaceOrder'://api下单
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					}  else {
						var choooseDatas = JSON.stringify(datas);

						layer.confirm('确定要api下单所选的数据吗？', { icon: 3 }, function() {
							layer.msg('处理中', { icon: 16, shade: 0.01,time:false });
							$.ajax({
								url: '/api/inter/tccLogisticsComprehensiveOrder/apiPlaceOrder',
								data: {'choooseDatas':choooseDatas},
								type: 'POST',
								async: true,
								success: function(res) {
									if (res.code == 0) {
										layer.closeAll();
										layui.table.reloadData(tableId);
										layer.alert(res.msg);
									} else {
										layer.closeAll();
										layer.alert(res.msg);
									}
								}, error: function() {
									layer.close();
									layer.msg("打印失败，请稍后再试！", { icon: 2 });
								}
							});
						}, function() {
						});
					}
					break;
				}
				case 'event-to-apicancel'://物流订单取消（api）
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					}  else {
						var choooseDatas = JSON.stringify(datas);

						layer.confirm('确定要物流订单取消（api）所选的数据吗？', { icon: 3 }, function() {
							layer.msg('处理中', { icon: 16, shade: 0.01,time:false });
							$.ajax({
								url: '/api/inter/tccLogisticsComprehensiveOrder/apicancel',
								data: {'choooseDatas':choooseDatas},
								type: 'POST',
								async: true,
								success: function(res) {
									if (res.code == 0) {
										layer.closeAll();
										layui.table.reloadData(tableId);
										layer.alert(res.msg);
									} else {
										layer.closeAll();
										layer.alert(res.msg);
									}
								}, error: function() {
									layer.close();
									layer.msg("打印失败，请稍后再试！", { icon: 2 });
								}
							});
						}, function() {
						});
					}
					break;
				}
				case 'event-to-apiGetC88'://C88文件获取（api)
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					}  else {
						var choooseDatas = JSON.stringify(datas);

						layer.msg('处理中', { icon: 16, shade: 0.01,time:false });
						$.ajax({
							url: '/api/inter/tccLogisticsComprehensiveOrder/apiGetC88',
							data: {'choooseDatas':choooseDatas},
							type: 'POST',
							async: true,
							success: function(res) {
								if (res.code == 0) {
									layer.closeAll();
									layui.table.reloadData(tableId);
									layer.alert(res.msg);
								} else {
									layer.closeAll();
									layer.alert(res.msg);
								}
							}, error: function() {
								layer.close();
								layer.msg("打印失败，请稍后再试！", { icon: 2 });
							}
						});
					}
					break;
				}
				case 'event-to-apiPrintTag'://标签获取打印（api）
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 20) {
						layer.alert('只能选中20行数据');
					} else {
						var choooseDatas = JSON.stringify(datas);
						layer.confirm('确定标签打印吗?', {icon: 3}, function () {
							t.showloadings(true);
							$.ajax({
								type: "POST",
								url: '/api/inter/tccLogisticsComprehensiveOrder/apiPrintTag',
								data: {'choooseDatas': choooseDatas},
								success: function (res) {
									if (res.code == 0) {
										t.showloadings(false);
										layer.msg(res.msg);
										var content = [];
										for (let i = 0; i < res.data.length; i++) {
											var urlPdf = res.data[i]; // 拼接PDF的完整路径
											content.push(urlPdf);
										}
										var json = {};
										json.action = "previewfile";   //打印指令动作。json.action = "preview"，则生成预览。
										json.format = "pdf_url";        //指定格式为pdf_url。
										// json.docwidth = 20; // 单位：cm
										// json.doclength = 30; // 单位：cm

										json.paperwidth = 10;
										json.paperlength = 10;

										json.content = content;
										// json.cert = window.location.href.split("/web")[0] + "/static/plugins/printWorld/pdf_mini-ease.com.ctf";
										json.cert = "https://file.mini-ease.com/upload/nomodule/202412/13/163232652.ctf";
										var pw = GetPrintWorld();    //获取打天下对象
										pw.Act(json);
										location.reload();
									} else {
										t.showloadings(false);
										alert(res.msg);
									}
								}
							});
						});
					}
					break;
				}


				case 'event-to-countCost'://按单收费核算
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						if(datas[0].freightMethod=='1'){
							return layer.alert('计算方式为：按物流发票，无需按单收费核算');
						}
						if(datas[0].logInvoiceWeight!=null && datas[0].logInvoiceWeight!='' && datas[0].logInvoiceWeight!='0'){
							return layer.alert('已经核算过，无需再次核算（可点击\"按单收费核算取消\"后再进行重新核算）');
						}

						layer.msg('处理中', { icon: 16, shade: 0.01,time:false });
						$.ajax({
							url: '/api/inter/tccLogisticsComprehensiveOrder/countCost',
							data: {'logisticsMarkingBid':datas[0].logisticsMarkingBid},
							type: 'POST',
							async: true,
							success: function(res) {
								if (res.code == 0) {
									layer.closeAll();
									layui.table.reloadData(tableId);
									layer.alert(res.msg);
								} else {
									layer.closeAll();
									layer.alert(res.msg);
								}
							}, error: function() {
								layer.close();
								layer.msg("操作失败，请稍后再试！", { icon: 2 });
							}
						});


					}
					break;
				}

				case 'event-to-countCostCancel'://按单收费核算取消
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						if(datas[0].freightMethod=='1'){
							return layer.alert('计算方式为：按物流发票，无需按单收费核算');
						}
						if(datas[0].logInvoiceWeight==null ||  datas[0].logInvoiceWeight=='' ||  datas[0].logInvoiceWeight=='0'){
							return layer.alert('还未核算过，无需取消；');
						}

						layer.confirm('确定要取消收费核算所选的数据吗？', { icon: 3 }, function() {
							layer.msg('处理中', { icon: 16, shade: 0.01,time:false });
							$.ajax({
								url: '/api/inter/tccLogisticsComprehensiveOrder/countCostCancel',
								data: {'logisticsMarkingBid':datas[0].logisticsMarkingBid},
								type: 'POST',
								async: true,
								success: function(res) {
									if (res.code == 0) {
										layer.closeAll();
										layui.table.reloadData(tableId);
										layer.alert(res.msg);
									} else {
										layer.closeAll();
										layer.alert(res.msg);
									}
								}, error: function() {
									layer.close();
									layer.msg("操作失败，请稍后再试！", { icon: 2 });
								}
							});
						}, function() {
						});
					}
					break;
				}
			};
		},

		listenMenu20488: function(obj, datas) {//物流对账（内嵌不展示）
			var t = this;
			switch(obj.event){
				case 'event-to-wlImport'://服务商物流费用导入
				{
					t.openImport(20488); // 导入的菜单ID
					break;
				}
				case 'event-to-gsImport'://服务商关税费用导入
				{
					t.openImport(20491); // 导入的菜单ID
					break;
				}
				case 'event-to-dzsmImport'://对账说明导入
				{
					t.openImport(20492); // 导入的菜单ID
					break;
				}
				case 'event-to-export'://导出
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tccLogisticsReconcile/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-apiDz'://对账（api）
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else {
						var _list = [];
						var serviceIdSet = new Set();
						for (var i = 0; i < datas.length; i++) {
							_list[i] = datas[i].logInvoiceNo;
							serviceIdSet.add(datas[i].serviceId);
						}

						if (serviceIdSet.size > 1){
							return layer.alert('选择的物流服务商必须一致!');
						}
						layer.confirm('确定对账(api)?', {icon: 3}, function () {
							t.showloadings(true);
							$.ajax({
								url: '/api/inter/tccLogisticsReconcile/apiDz',
								data: "list=" + _list,
								type: 'POST',
								async: true,
								success: function (res) {
									if (res.code == 0) {
										t.showloadings(false);
										layer.msg(res.msg);
										setTimeout(function(){
											t.showloadings(false);
											location.reload();
										}, 1000);
									} else {
										t.showloadings(false);
										layer.msg(res.msg);
									}
								}, error: function () {
									layer.close();
									layer.msg("对账(api)失败，请稍后再试！", {icon: 2});
								}
							});
						});
					}
					break;
				}
			};
		},

		listenMenu20489: function(obj, datas) {//物流付款单（关税费）
			var t = this;
			switch(obj.event){
				case 'event-to-add'://新增
				{
					t.openUrl('物流付款单(关税费)-新增',"/web/storage/tccLogisticsPaymentTariff/toAdd",1);
					break;
				}
				case 'event-to-export'://导出
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tccLogisticsPaymentTariff/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},

		listenMenu20490: function(obj, datas) {//物流付款单（物流费）
			var t = this;
			switch(obj.event){
				case 'event-to-add'://新增
				{
					t.openUrl('物流付款单(物流费)-新增',"/web/storage/tccLogisticsPaymentFee/toAdd",1);
					break;
					break;
				}
				case 'event-to-export'://导出
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tccLogisticsPaymentFee/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},


		listenMenu20496: function(obj, datas) {//运营数据统计表
			var t = this;
			var tableId = t.c.id_table_main;
			switch(obj.event){


				case 'event-to-editAwsSurplusAmount'://编辑亚马逊余额
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					} else if(datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {

						var util = layui.util;
						layer.prompt({title: '请输入亚马逊余额'}, function(value, index, elem){
							if(value === '') return elem.focus();
							var price = util.escape(value);
							// 关闭 prompt
							layer.close(index);
							layer.msg('处理中', { icon: 16, shade: 0.01,time:false });
							$.ajax({
								url: '/api/inter/tcoBusinessDataStat/editAwsSurplusAmount',
								data: {id: datas[0].id,awsSurplusAmount: price},
								type: 'POST',
								async: true,
								success: function (res) {
									layer.closeAll();
									layui.table.reloadData(tableId);
									layer.alert(res.msg);
								},
								error: function () {
									layer.close();
									layer.msg("操作失败，请稍后再试！", {icon: 2});
								}
							});

						});
					}
					break;
				}

				case 'event-to-setVgsbm'://数据统计店铺清单
				{
					openUrl('数据统计店铺清单', '/indexCommonOfMenu?menuId=20497', 1);
					break;
				}


				case 'event-to-export'://导出
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcoBusinessDataStat/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}




			};
		},




		listenMenu20497: function(obj, datas) {//数据统计店铺清单
			var t = this;
			var tableId = t.c.id_table_main;
			switch(obj.event){
				case 'event-to-add':
				{

					window.matchValuesAfterModalSelectRadio = function(colCode, data, extraData) {
						console.log('data =',data);
						var vgsbm = data.vgsbm;

						layer.msg('处理中', { icon: 16, shade: 0.01,time:false });
						$.ajax({
							url: '/api/inter/tcoBusinessDataGs/add',
							data: {vgsbm:vgsbm},
							type: 'POST',
							async: false,
							success: function (res) {
								if(result.code=='0'){
									layer.closeAll();
									layui.table.reloadData(tableId);
									layer.alert(res.msg);
								}else {//失败
									layer.closeAll();
									layer.msg(res.msg, {icon: 2});
								}
							},
							error: function () {
								layer.close();
								layer.msg("操作失败，请稍后再试！", {icon: 2});
							}
						});
					};
					layui.YsModal.init({modalKey: 'TCO_BusinessDataGs', colCode: 'aaaa', parentObj: window});
					break;
				}



				case 'event-to-del'://删除
				{
					if(datas.length == 0) {
						layer.alert('尚未选中数据');
					}  else {
						var choooseDatas = JSON.stringify(datas);

						layer.confirm('确定要删除所选的公司吗？', { icon: 3 }, function() {
							layer.msg('处理中', { icon: 16, shade: 0.01,time:false });
							$.ajax({
								url: '/api/inter/tcoBusinessDataGs/del',
								data: {'choooseDatas':choooseDatas},
								type: 'POST',
								async: true,
								success: function(res) {
									if (res.code == 0) {
										layer.closeAll();
										layui.table.reloadData(tableId);
										layer.alert(res.msg);
									} else {
										layer.closeAll();
										layer.alert(res.msg);
									}
								}, error: function() {
									layer.close();
									layer.msg("操作失败，请稍后再试！", { icon: 2 });
								}
							});
						}, function() {
						});
					}
					break;
				}



			};
		},


		listenMenu20498: function(obj, datas) {//商品库批量导入详情（内嵌不显示）
			var t = this;
			var tableId = t.c.id_table_main;
			switch(obj.event){
				case 'event-to-exportMain':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tsBatchImportLog/exportMainErrorByTbProductBasis',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}

				case 'event-to-exportSub':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tsBatchImportLog/exportSubErrorByTbProductBasis',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
			};
		},


		listenMenu20499: function(obj, datas) {//商品库批量导入（内嵌不显示）
			var t = this;
			var tableId = t.c.id_table_main;
			switch(obj.event){
				case 'event-to-subImport':
				{
					t.openImport(20500); // 导入的菜单ID
					break;
				}
			};
		},


		listenMenu20502: function(obj, datas) {//采购计划
			var t = this;
			var tableId = t.c.id_table_main;
			switch(obj.event){
				case 'event-to-add':
				{
					t.openUrl('采购计划-新增',"/web/purchase/tcgPurchaseByPlan/toAdd",1);
					break;
				}
				case 'event-to-export':
				{
					$.ajax({
						type: "POST",
						url: '/api/inter/tcgPurchaseByPlan/export',
						data: t.c.gridObj.getConds(2),
						success: function (data) {
							if (data.code == 0) {
								if(data.msg != undefined && data.msg.startsWith('http')) {
									window.open(data.msg);
								} else {
									layer.msg(data.msg);
								}
							} else {
								alert(data.msg);
							}
						}
					});
					break;
				}
				case 'event-to-produceOrder'://生成订单、审核按钮
				{
					if(datas.length == 0) {
						return layer.alert('尚未选中数据');
					}
					var choooseDatas = JSON.stringify(datas);
					layer.confirm('确定要审核所选择的采购计划吗？', { icon: 3 }, function() {
						layer.msg('处理中', { icon: 16, shade: 0.01 });
						$.ajax({
							type: "POST",
							url: '/api/inter/tcgPurchaseByPlan/produceOrder',
							data: {
								choooseDatas: choooseDatas
							},
							success: function (data) {
								layer.closeAll();
								if (data.code == 0) {
									layui.table.reloadData(tableId);
									layer.alert(data.msg);
								} else {
									layer.msg(data.msg);
								}
							}, error: function() {
								layer.close();
								layer.msg("操作失败，请稍后再试！", { icon: 2 });
							}
						});
					}, function() {});
					break;
				}

				case 'event-to-cancel'://取消确认
				{
					if(datas.length == 0) {
						return layer.alert('尚未选中数据');
					}
					var choooseDatas = JSON.stringify(datas);
					layer.confirm('确定要取消所选择的采购计划吗？', { icon: 3 }, function() {
						layer.msg('处理中', { icon: 16, shade: 0.01 });
						$.ajax({
							type: "POST",
							url: '/api/inter/tcgPurchaseByPlan/cancel',
							data: {
								choooseDatas: choooseDatas
							},
							success: function (data) {
								layer.closeAll();
								if (data.code == 0) {
									layui.table.reloadData(tableId);
									layer.alert(data.msg);
								} else {
									layer.msg(data.msg);
								}
							}, error: function() {
								layer.close();
								layer.msg("操作失败，请稍后再试！", { icon: 2 });
							}
						});
					}, function() {});
					break;
				}


				case 'event-to-trajectory'://物流轨迹查询
				{
					if (datas.length == 0) {
						return layer.alert('尚未选中数据');
					} else if (datas.length > 1) {
						layer.alert('只能选中一行数据');
					} else {
						if(datas[0].purchaseOrderBid==undefined || datas[0].purchaseOrderBid==null || datas[0].purchaseOrderBid==''){
							return layer.alert('订单未创建，无法进行物流轨迹查询');
						}
						layer.msg('处理中', { icon: 16, shade: 0.01 });
						$.ajax({
							type: "POST",
							url: '/api/inter/1688/get1688OrderTraceInfo',
							data: {orderNo: datas[0].purchaseOrderBid},
							success: function (data) {
								layer.close();
								if(data.code==0 && data.data){
									t.htmldiv(JSON.stringify(data.data.reverse()))
								}else{
									layer.msg('暂无物流轨迹')
								}
							}, error: function() {
								layer.close();
								layer.msg("操作失败，请稍后再试！", { icon: 2 });
							}
						});
						break;
					}
					break;
				}

				case 'event-to-update'://物流修改
				{
					if (datas.length == 0) {
						return layer.alert('尚未选中数据');
					} else {
						var w = ($(window).width() * 0.3);
						var h = ($(window).height() * 0.4);
						var choooseDatas = JSON.stringify(datas);
						layer.open({
							shadeClose:true,
							area: [w + 'px', h + 'px'],
							title: '物流信息修改',
							content: `
								<form class="layui-form">
								  <div class="layui-form-item">
								  	 <label class="layui-form-label">
								  	 	<font class="f_red">*</font>
								  		 物流渠道
								  	 </label>
    								 <div class="layui-input-block">
									    <input type="text" name="aliLogisticsPlace" id="aliLogisticsPlace" lay-verify="required" placeholder="请输入物流渠道" class="layui-input">
									 </div>
								  </div>
								  <div class="layui-form-item">
								  <label class="layui-form-label">
								  	 	<font class="f_red">*</font>
								  		 物流运单号
								  	 </label>
									<div class="layui-input-block">
									  <input type="text" name="aliLogisticsBillNo" id="aliLogisticsBillNo" lay-verify="required" placeholder="请输入物流运单号" class="layui-input">
									</div>
								  </div>
								</form>
							`,
							success: function(layero, index) {},
							yes: function (index, layero) {
								layer.msg('处理中', { icon: 16, shade: 0.01 });
								var aliLogisticsPlace = $('#aliLogisticsPlace').val();
								var aliLogisticsBillNo = $('#aliLogisticsBillNo').val();
								$.ajax({
									type: "POST",
									url: '/api/inter/tcgOfflinePurchaseInStorage/wlUpdate',
									data: {choooseDatas: choooseDatas,aliLogisticsPlace:aliLogisticsPlace,aliLogisticsBillNo:aliLogisticsBillNo},
									success: function (data) {
										if (data.code == 0) {
											layer.alert(data.msg);
											setTimeout(function(){
												layer.closeAll();
												location.reload();
											}, 3000);
										} else {
											layer.closeAll();
											layer.alert(data.msg);
										}
									}, error: function() {
										layer.close();
										layer.msg("操作失败，请稍后再试！", { icon: 2 });
									}
								});
							}
						});
						break;
					}
					break;
				}

			};
		},





		isFrom1_0: function() {
			if(window.top.isMobile!=undefined || window.top.isMobile!=null) {
				return false;
			} else {
				return true;
			}
	    },
	    openUrl: function(title, url, toType) { // toType，打开页面方式，1标签页2新页面
	    	var isOn1_0 = this.isFrom1_0();
	    	if (isOn1_0 == true) {
				window.open(url);
			} else {
				if (toType != null && toType != undefined) {
					if (toType == 1) {
						window.top.add_tab(title,url);
					} else {
						window.open(url);
					}
				}
			}
	    },
	    /*
	     * 打开导入弹出框
	     */
	    openImport: function(menuId) {
	    	var t = this;
			$.ajax({
				type: "POST",
				url: '/api/inter/ysMenu/importConfig',
				data: {menuId: menuId},
				success: function (data) {
					if (data.code == 0) {
						t.importMenuId = data.data.menuId;
						t.importFileName = data.data.fileName;
						t.importFields = data.data.nameValMap;
						t.openImport2();
					} else {
						alert(data.msg);
					}
				}
			});
	    },
	    openImport2: function() {
	    	var t = this;
	    	var content =
	    		`<form enctype="multipart/form-data" style="margin-top:20px; margin-bottom:10px;">`
	    			+ `<div style="margin-left:8%">`
	    				+ `<input type="file" id="file" name="file"/>`
	    				+ `<div style="margin-top: 10px; padding-top: 5px;">`
	    					+ `<a href="javascript:void(0);" class="layui-btn layui-btn-xs" data-filter="_import_btn_download_template"><i class="iconfont icon-format-exl"></i> 下载模板</a>`
	    				+ `</div>`
	    				+ `<font color="red" class="pull-left" style="margin-top: 10px;">提示：仅允许导入“xls”或“xlsx”格式文件！</font>`
	    			+ `</div>`
	    		+ `</form>`
	    		+ `<script type="text/javascript" src="/static/plugins/xlsxFull/xlsx.full.min.js"></script>`;
	    	
            layer.open({
                type: 1,
                area: ['400px', '230px'],
                fix: false, 
                offset: '10%',
                maxmin: true,
                shade: 0.3,
                title: '导入',
                content: content,
                btn: ['<i class="layui-icon layui-icon-ok"></i> 导入', '<i class="layui-icon layui-icon-close"></i> 取消'],
                shadeClose: true,
                zIndex: 1000,
                btn1: function (index, layero) {
                    var file = layero.find('#file');
                    if (!file[0]['value']) {
                        layer.msg("请选择文件！");
                        return false;
                    }
                    t.readExcelList(file[0]);
                },
				success: function(layero, index) {
					// 绑定下载模板按钮
					$('a[data-filter="_import_btn_download_template"]').on('click',function (e) {

						var indexOfLoading = layer.load(1, {
							shade: [0.5,'#000000'] //0.1透明度的白色背景
						});
						
						$.ajax({
							type: 'post',
							url: '/api/inter/common/generateImportTemplate',
							data: {menuId: t.importMenuId},
							dataType: "json",
							success: function (res) {
								const xhr = new XMLHttpRequest();
								xhr.open('GET', res.data.url);
								xhr.responseType = 'blob';
								xhr.onload = function() {
									const blob = xhr.response;
									const link = document.createElement('a');
									link.href = URL.createObjectURL(blob);
									link.download = t.importFileName;
									link.target = "_blank"; // 可选，如果希望在新窗口中下载文件，请取消注释此行
									link.click();
								};
								xhr.send();
								layer.close(indexOfLoading);
							},
							error: function () {
							    alert("加载失败！")
							}
						});
					});
				}
            });
	    },
	    /*
	     * 读取表格数据
	     */
	    readExcelList: function(obj) {
	    	var t = this;
	    	
			var wb;//读取完成的数据
			var rABS = false; //是否将文件读取为二进制字符串
			var iid;
			if(!obj.files) {
				return;
			}
			const IMPORTFILE_MAXSIZE = 1*2048;       //这里可以自定义控制导入文件大小
			var suffix = obj.files[0].name.split(".").slice(-1);
			if(suffix != 'xls' && suffix !='xlsx'){
				layer.msg('导入的文件格式不正确!');
				return
			}
			if(obj.files[0].size/1024 > IMPORTFILE_MAXSIZE){
				layer.msg('导入的表格文件不能大于2M');
				return
			}
			
			var f = obj.files[0];
			var reader = new FileReader();
			var reStr='';
			reader.onload = function(e) {
				var data = e.target.result;
				if(rABS) {
					wb = XLSX.read(btoa(fixdata(data)), {     //手动转化
						type: 'base64'
					});
				} else {
					wb = XLSX.read(data, {
						type: 'binary'
					});
				}
				var strForm=XLSX.utils.sheet_to_json(wb.Sheets[wb.SheetNames[0]]);
				var excelData = [], tStr = trStr='';
				for(var i=0; i<strForm.length; i++){
					var trData = {},strFormTr = {};
					$.each(strForm[i], function(si, sv){
						strFormTr[si.replace("*", "")] = sv;
					})
					trStr += '<tr><td style="border:solid 1px #ddd;padding:10px;font-size:14px;text-align: center;">' + Number(i+1) + '</td>';
					// 将NAME-val格式转换成val-name格式
					$.each(t.importFields, function(key,val){
						tStr = strFormTr[key.replace("*", "")] ? strFormTr[key.replace("*", "")] : '';
						trStr += '<td style="border:solid 1px #ddd;text-align:left;padding:10px;font-size:14px;">' + tStr + '</td>';
						trData[val] = tStr;
					})
					trStr += '</tr>';
					excelData.push(trData);
				}
			    var thStr = '<tr><th style="background:#eee;color:#3366cc;border:solid 1px #ddd;text-align:left;padding:10px;font-size:14px;"><div style="width:30px;">序号</div></th>';
				t.showImportTable(excelData);
			    $.each(t.importFields, function (i, val) {
			        thStr += '<th><div style="background:#eee;color:#3366cc;border:solid 1px #ddd;text-align:left;padding:10px;font-size:14px;">' + i + '</div></th>';
			    })
				$("#itbody").html(thStr + trStr);
			};
			if(rABS) {
				reader.readAsArrayBuffer(f);
			} else {
				reader.readAsBinaryString(f);
			}
			return true;
	    },
	    /*
	     * 弹出要导入的表格数据
	     */
	    showImportTable: function(listDataObj) {
	    	var t = this;
	    	
	    	var content =
	    		`<div id="iTable" class="display_no">`
					+ `<table class="importTable listext" data-resizable-columns-id="demo-table">`
						+ `<tbody id="itbody"></tbody>`
					+ `</table>`
				+ `</div>`;
	    	layer.open({
	    		type: 1,
	    		area: ['800px', '500px'],
	    		fix: false,
	    		offset: '10%',
	    		maxmin: true,
	    		shade: 0.3,
	    		title: '导入明细',
	    		content: content,//产品信息扩展iForm
	    		btn: ['<i class="layui-icon layui-icon-ok"></i> 确定', '<i class="layui-icon layui-icon-close"></i> 取消'],
	    		shadeClose: true,
	    		zIndex: 1001,
	    		success: function(layero, index){
					var menuId = t.importMenuId;
					if(menuId == '10416' || menuId == '10443' || menuId == '10447' || menuId == '10169' || menuId == '20498' || menuId == '20500'){

					}else {
						layui.form.render();
					}
	    		},
	    		btn1: function(index, layero){
					var indexOfLoading = layer.load(1, {
						shade: [0.5,'#000000'] //0.1透明度的白色背景
					});
	    			var importObj = [],
	    				inum = 0,
	    				onetime = 1,
	    				flag = 1,
	    				oneImportNum = 2, 						//默认一次导入条数
	    				allImportNum = listDataObj.length, 		//数据总量
	    				times = 0;		//请求次数
	    			setTimeout(function(){
	    				if(allImportNum > 9 && allImportNum <= 100){
	    					oneImportNum = 5;
	    				}else if(allImportNum > 100 && allImportNum <= 500){
	    					oneImportNum = 30;
	    				}else if(allImportNum > 500 && allImportNum <= 1000){
	    					oneImportNum = 50;
	    				}else if(allImportNum > 1000){
	    					oneImportNum = 100;
	    				}

	    				times = Math.ceil(allImportNum/oneImportNum);
	    				t.eachImport(listDataObj, 0, oneImportNum, allImportNum, times, 1);
	    				return false;
	    			}, 1000);
	    		}
	    	});
	    },
	    /*
	     * 提交数据到服务端
	     */
	    eachImport: function(listDataObj, startNum, oneImportNum, allImportNum, times, timeNum) {

	    	var t = this;
	        var importObj = [];
		    for (var i = startNum; i < startNum + oneImportNum; i++) {
		        if (i >= allImportNum) break;
		        importObj.push(listDataObj[i]);
		    }
		    $.ajaxSettings.async = false;
		    var menuId = t.importMenuId;

			$.post('/api/inter/common/importBatch', {menuId: menuId, rows: JSON.stringify(importObj)}, function (res) {
				console.log('当前次数:' + timeNum);
				console.log('times:' + times);
				if(res.code!='0'){
					timeNum = times+100;
					return layer.alert(res.msg);
				}
				importObj = [];
				timeNum += 1;
				var isOpen = false;
				if(menuId == '10361') {//费用结算单
					var bid = res.msg;
					if (timeNum > times) {
						layer.closeAll();
						t.openUrl("费用结算单 - 新增","/web/finance/tcwExpenseSettlement/toAddByImport?bid="+bid, 1);
					}else {
						for(var i=0;i<listDataObj.length;i++){
							listDataObj[i].bid = bid;
						}
					}
				} else if(menuId == '10360') {//费用划拨单
					var bid = res.msg;
					if (timeNum > times) {
						layer.closeAll();
						t.openUrl("费用划拨单 - 新增","/web/finance/tcwExpenseAllocation/toAddByImport?bid="+bid, 1);
					}else {
						for(var i=0;i<listDataObj.length;i++){
							listDataObj[i].bid = bid;
						}
					}
				} else if(menuId == '10410'){//入账申请单
					var bid = res.msg;
					if (timeNum > times) {
						layer.closeAll();
						t.openUrl("入账申请单 - 新增","/web/finance/tcwEntryApply/toAddByImport?bid="+bid, 1);
					}else {
						for(var i=0;i<listDataObj.length;i++){
							listDataObj[i].bid = bid;
						}
					}
				} else if(menuId == '10413'){//费用划拨单-管理
					var bid = res.msg;
					if (timeNum > times) {
						layer.closeAll();
						t.openUrl("费用划拨单（管理） - 新增","/web/finance/tcwExpenseAllocationByManage/toAddByImport?bid="+bid, 1);
					}else {
						for(var i=0;i<listDataObj.length;i++){
							listDataObj[i].bid = bid;
						}
					}
				} else if(menuId == '10352'){//职能费用申请-管理
					var bid = res.msg;
					if (timeNum > times) {
						layer.closeAll();
						t.openUrl("职能费用申请 - 新增","/web/finance/tcwRoleCostApply/toAddByImport?bid="+bid, 1);
					}else {
						for(var i=0;i<listDataObj.length;i++){
							listDataObj[i].bid = bid;
						}
					}
				} else if(menuId == '10353'){//付款申请单-管理
					var bid = res.msg;
					if (timeNum > times) {
						layer.closeAll();
						t.openUrl("付款申请单 - 新增","/web/finance/tcwPaymentApply/toAddByImport?bid="+bid, 1);
					}else {
						for(var i=0;i<listDataObj.length;i++){
							listDataObj[i].bid = bid;
						}
					}
				} else if(menuId == '10416'){//线上采购入库
					if (timeNum > times) {
						if (res.data != null){
							layer.closeAll();
							$.ajax({
								type: "POST",
								url: '/api/inter/tcgOfflinePurchaseInStorage/exportBc',
								data: {"aliLogisticsBillNoList": res.msg,"bid":res.data},
								async: true,
							});
							var bidArr = res.msg.split(",");
							if(bidArr!=null && bidArr.length>5){
								return layer.alert("存在批量标记错误信息:"+res.data);
							}else {
								return layer.alert("以下物流单号出错:"+res.msg);
							}
						}else {
							layer.closeAll();
							layer.msg("导入成功!");
						}
					}else {
						for(var i=0;i<listDataObj.length;i++){
							listDataObj[i].errorMsg = res.msg;
							listDataObj[i].bid = res.data;
						}
					}
				}  else if(menuId == '10443'){//HW商品库
					if (timeNum > times) {
						$.ajax({
							type: "POST",
							url: '/api/inter/tosProductBasis/importInfoFromBatchImportLogByUser',
							data: {},
							async: true,
						});
						layer.closeAll();
						return layer.alert("请点击“导入详情”按钮查看导入进度！");
					}
				}  else if(menuId == '10447') {//HW商品listing库
					if (timeNum > times) {
						$.ajax({
							type: "POST",
							url: '/api/inter/tosProductActive/importInfoFromBatchImportLogByUser',
							data: {},
							async: true,
						});
						layer.closeAll();
						return layer.alert("请点击“导入详情”按钮查看导入进度！");
					}
				}  else if(menuId == '10169'){//商品备案申请
					if (timeNum > times) {
						$.ajax({
							type: "POST",
							url: '/api/inter/tpProductBq/importYpDelRedis',
							data: {},
							async: true,
						});
						layer.msg("导入成功");
						setTimeout(function(){
							layer.closeAll();
							location.reload();
						}, 3000);
					}
				}else if(menuId == '20488'){//服务商物流费用导入
						if (timeNum > times) {
							layer.closeAll();
							var bidArr = res.msg.split(",");
							if(bidArr!=null && bidArr.length >1){
								return layer.alert("以下FBA单号出错:"+res.msg);
							}else {
								return layer.msg("导入成功!");
							}
						}else {
							for(var i=0;i<listDataObj.length;i++){
								listDataObj[i].errorMsg = res.msg;
								listDataObj[i].bid = res.data;
							}
						}
				} else if(menuId == '20491'){//服务商关税导入
						if (timeNum > times) {
							layer.closeAll();
							var bidArr = res.msg.split(",");
							if(bidArr!=null && bidArr.length >1){
								return layer.alert("以下FBA单号出错:"+res.msg);
							}else {
								return layer.msg("导入成功!");
							}
						}else {
							for(var i=0;i<listDataObj.length;i++){
								listDataObj[i].errorMsg = res.msg;
								listDataObj[i].bid = res.data;
							}
						}
				} else if(menuId == '20492'){//对账说明导入
						if (timeNum > times) {
							layer.closeAll();
							var bidArr = res.msg.split(",");
							if(bidArr!=null && bidArr.length >1){
								return layer.alert("以下FBA单号出错:"+res.msg);
							}else {
								return layer.msg("导入成功!");
							}
						}else {
							for(var i=0;i<listDataObj.length;i++){
								listDataObj[i].errorMsg = res.msg;
								listDataObj[i].bid = res.data;
							}
						}
				}  else if(menuId == '20498') {//商品库批量导入
					if (timeNum > times) {
						$.ajax({
							type: "POST",
							url: '/api/inter/tpProductBasis/importInfoFromBatchImportLogByMain',
							data: {},
							async: true,
						});
						layer.closeAll();
						return layer.alert("请点击“导入详情”按钮查看导入进度！");
					}
				}  else if(menuId == '20500') {//商品库子件批量导入
					if (timeNum > times) {
						$.ajax({
							type: "POST",
							url: '/api/inter/tpProductBasis/importInfoFromBatchImportLogBySub',
							data: {},
							async: true,
						});
						layer.closeAll();
						return layer.alert("请点击“导入详情”按钮查看导入进度！");
					}
				} else{
					if (timeNum >= times) {
						layer.closeAll();
						layer.alert(res.msg);
					}
				}

			}, "json");

		    setTimeout(function () {
		        if (timeNum <= times) {
		            t.eachImport(listDataObj, startNum + oneImportNum, oneImportNum, allImportNum, times, timeNum);
		        } else {
					if(menuId == '10416' || menuId == '10443' || menuId == '10447'|| menuId == '20488'|| menuId == '20492'|| menuId == '20491' || menuId == '20498' || menuId == '20500'){//线上采购入库

					}else {
						layer.closeAll();
					}

		        }
		    }, 500);
	    },
		htmldiv: function(arr) {
			var data = JSON.parse(arr)
			var str = '<ul class="layui-timeline" style="padding:10px 20px;">'
			for (var i = 0; i < data.length; i++) {
				str += `<li class="layui-timeline-item">
                  <i class="layui-icon layui-timeline-axis"></i>
                  <div class="layui-timeline-content layui-text">
                    <h3 class="layui-timeline-title">${data[i].acceptTime}</h3>
                    <p>${data[i].remark}</p>
                  </div>
                </li>`
			}
			str += '</ul>'
			layer.open({
				type: 1,
				title: '物流轨迹',
				area: ['700px', '500px'], //宽高
				content: str
			});
		},

		//加载中
		showloadings: function(t) {
			if (t) {//如果是true则显示loading
				layer.load(2, {
					shade: [0.1, '#000'] //0.1透明度的白色背景
				});
			} else {//如果是false则关闭loading
				layer.closeAll();
			}
		}
	};
	/* 定义object对象【end】 */
	
	
	exports('YsGridBtn', object);
});